Biostar Beta. Not for public use.
no exact read?
0
Entering edit mode
16 months ago
star • 150
Netherlands

I have some ChIP-seq data with 36 bp read length and I have done aligning with bowtie2 with below cod:

bowtie2 --very-sensitive --score-min C,0,0 -p 8 -x Genome_Index input.fastq.gz -S output.sam

and then I have tried to extract only 1 exact match with below cod:

samtools view -hf 0x2 output.sam | grep -v "XS:i:" > unique_output.sam

but I do not know why I get unique_output.sam without no data?, while the size of my output.sam is 4.6 GB. I also tried below cod:

samtools view  output.sam | grep -v "XS:i:" > unique_output.sam

and I got the unique_output.sam file with 2.2 GB.

ADD COMMENTlink
3
Entering edit mode

Hello,

as far as I know the 0x2 flag means "properly paired". Do you have paired-end reads?

fin swimmer

ADD REPLYlink
1
Entering edit mode

https://broadinstitute.github.io/picard/explain-flags.html

*Warning: Flag(s) and 0x2 cannot be set when read is not paired

ADD REPLYlink
0
Entering edit mode

@h.mon, thanks ! So , use grep _v xs:i, would be enought to extract 1 match reads?

ADD REPLYlink
0
Entering edit mode

Dear Fin,

No in this case is single end, you are right! So I should not use 0x2 and just removing xi:s would be fin, right?

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.3.1