This is a test version of Biostars. For the public version, visit https://www.biostars.org.
converting Bam to fastq while removing clipping(hard/soft clip bases)

Hello,

I want to do some analysis and my raw data is paired-end reads fastq files. So far:

  1. I used BWA mem to convert them to Sam file

  2. then used samtools to convert to BAM file.

My next step is to convert bam file to fastq file and for that, first I need to exclude the clipping (hard/soft clip bases). Is there any tool that does this while converting to fastq file?

So far, I looked into few tools below:

  1. samtools: I couldn't find any option that remove clipping while converting to fastq.
  2. picard: --CLIPPING_ACTION seems to do this if I set it to 'X'. But I am not sure.
soft-clipping fastq hard-clipping bam

1 answer

Hard clipped bases are not in the BAM file.

As for soft-clipped reads use the answers here: Remove Soft Clipped Bases

Great, that's what I wanted. Thanks,

Log in to answer this question.