psathyrella / partis

B- and T-cell receptor sequence annotation, simulation, clonal family and germline inference, and affinity prediction
GNU General Public License v3.0
55 stars 34 forks source link

Nonsense k bounds exception #220

Closed Irrationone closed 6 years ago

Irrationone commented 7 years ago
Traceback (most recent call last):
  File "./bin/partis.py", line 486, in <module>
    args.func(args)
  File "./bin/partis.py", line 201, in run_partitiondriver
    parter.cache_parameters()
  File "/shahlab/azhang/projects/ITH_Immune/software/partis/python/partitiondriver.py", line 257, in cache_parameters
    self.run_hmm('viterbi', parameter_in_dir=self.sw_param_dir, parameter_out_dir=self.hmm_param_dir, count_parameters=True)
  File "/shahlab/azhang/projects/ITH_Immune/software/partis/python/partitiondriver.py", line 738, in run_hmm
    self.write_hmm_input(algorithm, parameter_in_dir, partition, shuffle_input=shuffle_input)
  File "/shahlab/azhang/projects/ITH_Immune/software/partis/python/partitiondriver.py", line 1166, in write_hmm_input
    self.write_to_single_input_file(self.hmm_infname, nsets, parameter_dir, skipped_gene_matches, shuffle_input=shuffle_input)
  File "/shahlab/azhang/projects/ITH_Immune/software/partis/python/partitiondriver.py", line 1120, in write_to_single_input_file
    combined_query = self.combine_queries(query_name_list, genes_with_hmm_files, skipped_gene_matches=skipped_gene_matches)
  File "/shahlab/azhang/projects/ITH_Immune/software/partis/python/partitiondriver.py", line 1073, in combine_queries
    raise Exception('nonsense k bounds for %s (v: %d %d  d: %d %d)' % (':'.join(query_names), combo['k_v']['min'], combo['k_v']['max'], combo['k_d']['min'], combo['k_d']['max']))
Exception: nonsense k bounds for HS22_80_H27KGBCXX_2_1209_3065_78853 (v: -5 290  d: 15 47)

Here's the problematic sequence:

@HS22:80:H27KGBCXX:2:1209:3065:78853
GTAGCTTTAGGTGTCTGTAAAACAGGTGCCGAAGAAGCTGGAGTAACAGAAGTGAGAACCAGCTTATCAGAAAAAAAGTTTGAATTATGGCGAGAAATAAAAGTCTGAAACATGATTAAACTTCTAAGCAGAAAACCTACCGCGCTTCGCTTGGTCAACCCCTCAGCGGCAAAAATTAAAATTTTTACCGCTTCGGCGTTATAACCTCACACTCAATCTTTTATCACGAAGTCATGATTGAATCGCGAGTGGTCGGCAGATTGCGATAAACGGTCACATTAAATTTAACCTGACTATTCCACTGCAACAACTGAACGGACTGGAAACACTGGTCATAATCATGGTGGCGAATAAGTACGCGTTCTTGCAAATCACCAGAAGGCGGTTCCTGAATGAATGGGAAGCCTTCAAGAAGTC
psathyrella commented 7 years ago

oh, jeez, that's terrible. I thought I managed to rejigger everything last week so that's totally impossible.

Actually, it doesn't happen when I run. I wonder if you picked up the changes from last week?

Irrationone commented 7 years ago

I pulled & rebuilt last Friday morning. It was only this sample that threw the exception (out of ~40 or so that completed).

This is the command that threw the error, if it helps:

'['./bin/partis.py', 'cache-parameters', '--n-procs', '16', '--infname', '<seqfile>', '--outfname', '<outfile>', '--parameter-dir', '<paramdir>', '--parameter-type', 'hmm', '--species', 'human']'
psathyrella commented 7 years ago

Huh, ok. Well command line looks ok, so it must only happen when it's run along with the rest of the sample (sequences affect each other, mostly through the N padding necessary before passing to the hmm). Any chance you can send the sample as a whole?

Irrationone commented 7 years ago

I'll ask again and see if I can send one over. So far it's been a problem with 2/32 samples.

psathyrella commented 7 years ago

No hurry if you saw it, but I think you may have not been sent the notifications for this https://github.com/psathyrella/partis/issues/190 issue because I kept on mistyping your user name with an 'l' instead of an 'I'.

On Tue, Oct 25, 2016 at 10:30 AM, Irrationone notifications@github.com wrote:

I'll ask again and see if I can send one over. So far it's been a problem with 2/32 samples.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/psathyrella/partis/issues/220#issuecomment-256103738, or mute the thread https://github.com/notifications/unsubscribe-auth/AC0rczicj0_EneBOHPRCnlArXvf3Rb7Zks5q3jyjgaJpZM4KdsMq .

Irrationone commented 7 years ago

Sorry just got around to this -- I'll have a look at it. I didn't use Docker to set up partis but I can test the SGE support you added (thanks, by the way!).

psathyrella commented 7 years ago

so the last round of changes apparently didn't fix this! damn. Example failure at end of comments for #225.

oh, wait, damn, this isn't that issue