This is a test version of Biostars. For the public version, visit https://www.biostars.org.
no exact read?

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

Hello,

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

fin swimmer

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?

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

0 answers

No answers yet.

Log in to answer this question.