Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seqkit amplicon minus strand co-ordinates count from end #367

Closed
ZacharyArdern opened this issue Feb 20, 2023 · 2 comments
Closed

seqkit amplicon minus strand co-ordinates count from end #367

ZacharyArdern opened this issue Feb 20, 2023 · 2 comments
Labels

Comments

@ZacharyArdern
Copy link

ZacharyArdern commented Feb 20, 2023

Describe your issue

when using seqkit amplicon, if the primers extract a negative strand feature, the co-ordinates given (with BED format) are counted from the end of the chromosome/contig. I think this is not the expected/intended behaviour, and is not the behaviour of seqkit locate. e.g.:

seqkit amplicon --bed -t dna -F ATGGAGATGTTGTCTGGAGCCG -R VTAYASRCRYYTAAGYTTCGCW test.txt ;

seqkit locate -d -p ATGGAGATGTTGTCTGGAGCCG test.txt ;

Thank you!

test.txt

@shenwei356
Copy link
Owner

Yes, you're right. It's a bug, and I've just fixed it, please help to test it. Thanks for reporting.

echo -ne ">s\nATGGAGATGTTGTCTGGAGCCG\n"  \
    | seqkit stats 
file  format  type  num_seqs  sum_len  min_len  avg_len  max_len
-     FASTA   DNA          1       22       22       22       22

echo -ne ">s\nATGGAGATGTTGTCTGGAGCCG\n"  \
    | seqkit amplicon -F TGGAG -R GGCTCC -I --bed
s       1       21      .       0       +       TGGAGATGTTGTCTGGAGCC

echo -ne ">s\nATGGAGATGTTGTCTGGAGCCG\n"  \
    | seqkit amplicon -F GGCTCC -R TGGAG -I --bed
s       1       21      .       0       -       GGCTCCAGACAACATCTCCA

@ZacharyArdern
Copy link
Author

Thanks for the quick fix! I've tested it and it appears to have the correct behaviour now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants