I have multiple .bam files in a directory that I would like to run the following command on:
The command works great for one file, but I am trying to use that command on all .bam file in a directory (/home/cmccabe/Desktop/NGS).
to do multiple? or is there a better way? Thank you .
Code:
samtools view -H Input.bam | sed '/^@PG/d' | samtools reheader - Input.bam > Input_newheader.bam
to do multiple? or is there a better way? Thank you .
Code:
find *bam | parallel 'samtools view -H Input.bam | sed '/^@PG/d' | samtools reheader - Input.bam > Input_newheader.bam'
Comment