Wishing you guys have a nice Mayday.
I want to exclude certain reference tags(genes) from BAM files and direct the output to a new BAM file. I tired with SAMtools commend as below:
I obtained the output as
Am I doing that correctly, kindly please give me some suggestion. OR, should I use Picard tools to do so? If yes, may I know what Picard tools I should use.
Thank you very much for the help.
I want to exclude certain reference tags(genes) from BAM files and direct the output to a new BAM file. I tired with SAMtools commend as below:
Code:
foreach line (`cat tags2remain.txt `) samtools view 0H.ptMapped.bam | grep "$line" >>! 0H.tags2RemainMapped.bam end
Code:
[bam_header_read] EOF marker is absent. The input is probably truncated. [bam_header_read] invalid BAM binary header (this is not a BAM file). [main_samview] fail to read the header from "0H.tags2RemainMapped.bam"
Thank you very much for the help.
Comment