Hi,
I have fastq header of 1000s of reads. I want to check presence all of those reads in another bam file. I have written following script
while IFS='' read -r line || [[ -n "$line" ]]; do samtools view accepted_hits.bam | grep $line ;done < fastqHeaders.txt ;
But this is taking too much time as my .bam file is too big. does anyone know faster way to do this.
Kindly help
Chirag
After trying to play with grep and a sam file (it worked but was so sloooow), I found your answer and its much faster, thx.
any idea why FilterSamReads would result in
code:
try to remove the "\" except those at the end of the lines. For instance: