no exact read?
0
0
Entering edit mode
5.9 years ago
star ▴ 350

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.

R ChIP-Seq alignment bowtie2 bwa • 1.7k views
ADD COMMENT
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 REPLY
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 REPLY
0
Entering edit mode

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

ADD REPLY
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 REPLY

Login before adding your answer.

Traffic: 1623 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6