pysam fetch alignments corresponding to a taxid
0
0
Entering edit mode
2.6 years ago
pixie@bioinfo ★ 1.5k

Hello, I am new to pysam. I have a list of taxids (tid) as a python list. I want to extract sequences from the matching reads in the bam file (only primary alignments). How should I go about it ? Any other options ?

82f70c23-fedb-42fd-acf4-f252a6dfeceb    0       W1236514429|tid|34199|NC_035506.1|Aloe_vera_voucher_Aloe_vera_chloroplast_complete_genome     104188  0       3S17M1D17M2D12M1I3M2D12M2D87M1I8M3D5M1I4M3D2M1D18M4D36M30S      *       0       0       CACGGATACCTGGGCACCCAAGACGAGGAAGGGCGTAATGCGCAGAAATGGCTGAGGAGTTGAAAAAGCGTAGATCAGGAGATTCCCGAATAGGTCAACCTTTCAAACTGCTGCTGGATCCATGGGCAGGCAAGAGACAACCTGGCGAACTGAAAACATCTTAGCCTTGAGAAAAAGCAAAAGCGATTCCCTTGCGGCGAGCGAAATGGGAGCAGCCTAAACCGTGAGAAAAAAAACGAAAAGGTTGTGAAGTCAAA@>?;;:9.--,**)*-./,-)',-.73)().5.2311/02+(((%%'--*''('&&($'&&&&+('&&78::3366/.,*...1>?<=:8:21112>5555CFDABD>@??@?>44566;557<;88///098*-.+%$$%'(,/1.+++)(()-+,++5541+'%$%$%&)*/-**()25:=><<=@:9'$##%')50//00::;9.)()(&&(0/06<*))))()'&)*(+/.-,(&&&%'&&&%++)('(/103    NM:i:31 ms:i:148        AS:i:148        nn:i:0  tp:Z:P  cm:i:22 s1:i:129        s2:i:129        de:f:0.0905     rl:i:0RG:Z:a8763ed2dbe639724b8879ecd3fdd5920283fa0f_barcode11_2004_016_Pelargonium_Hexamers   pr:Z:primary    ti:Z:1437197    er:Z:sa       MD:Z:8A8^G17^GC1A3A0C8^TC1G10^AT4A6C39A43^TAG5A3^GAA2^G18^GTAG1A34
pysam samtools • 447 views
ADD COMMENT

Login before adding your answer.

Traffic: 2011 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6