making sure flexbounds/relpos are computed only for the final annotation phase in partis partition.
changed the flexbounds/relpos logic
Find the "consensus" sequence of the partition, and compute distances from each query seq to it.
We look through each query seq, from closest to "consensus" to farthest, and see if they can be used to compute flexbounds/relpos; if a query seq doesn't produce adequate bounds, go to the next query seq.
To produce adequate bounds, we 1) remove any 0-probability gene matches, 2) remove any "overlap" among same germline flexbounds (i.e. v_l/v_r), 3) remove any "overlap" between neighboring junction flexbounds (i.e. v_r/d_l), and 4) align the earliest V-entry and latest J-exit point to the observed sequence bounds.
If flexbounds/relpos are impossible to compute for a given partition, we flag it as a hmm_failure and do not write it to output.
Example command:
bin/partis partition --infname testing_amrit/input_seqs.fasta --outfname testing_amrit/tmp.yaml --linearham
flexbounds/relpos
are computed only for the final annotation phase inpartis partition
.flexbounds/relpos
logicflexbounds/relpos
; if a query seq doesn't produce adequate bounds, go to the next query seq.v_l/v_r
), 3) remove any "overlap" between neighboring junction flexbounds (i.e.v_r/d_l
), and 4) align the earliest V-entry and latest J-exit point to the observed sequence bounds.flexbounds/relpos
are impossible to compute for a given partition, we flag it as ahmm_failure
and do not write it to output.Example command:
bin/partis partition --infname testing_amrit/input_seqs.fasta --outfname testing_amrit/tmp.yaml --linearham