Hi,
I recently concatenated many 200nt sequences to the end of each other; these sequences were from different parts of genome. Then I fed this to Geneious as a reference sequences and mapped sequencing reads (each read = 70nt) to it. I exported the results as a bam file. Now I need to write a Perl script that parses the bam file and finds out whether or not each of those initial sequences (the 200nt ones that were concatenated) is covered in sequencing reads. I have read the Bio:
B::Sam tutorial on CPAN but I am still stuck. Here is all the code I have written so far:
I would appreciate your help, since CPAN manual only confuses me.
I recently concatenated many 200nt sequences to the end of each other; these sequences were from different parts of genome. Then I fed this to Geneious as a reference sequences and mapped sequencing reads (each read = 70nt) to it. I exported the results as a bam file. Now I need to write a Perl script that parses the bam file and finds out whether or not each of those initial sequences (the 200nt ones that were concatenated) is covered in sequencing reads. I have read the Bio:

Code:
use Bio::DB::Sam; my $sam = Bio::DB::Sam -> new (-fasta => ... , -bam => ...) ; my $segment; ($id)=$sam -> seq_ids; while ($i < $sam->length($id)) { $segment =$ sam -> segment($id , $i ,$i +200) ; # What should I write here? $i +=200; }
Comment