Question: no exact read?
0
gravatar for star
17 months ago by
star190
Netherlands
star190 wrote:

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.

bowtie2 bwa chip-seq alignment R • 419 views
ADD COMMENTlink modified 17 months ago • written 17 months ago by star190
3

Hello,

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

fin swimmer

ADD REPLYlink modified 17 months ago • written 17 months ago by finswimmer12k
1

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

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

ADD REPLYlink written 17 months ago by h.mon28k

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

ADD REPLYlink written 17 months ago by star190

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 written 17 months ago by star190
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1312 users visited in the last hour