BenLangmead / bowtie2

A fast and sensitive gapped read aligner
GNU General Public License v3.0
639 stars 159 forks source link

Bowtie forward and reverse complement fastq files #428

Closed KarinElimelech closed 8 months ago

KarinElimelech commented 1 year ago

Hi, I'm not sure it's an issue, but be glad for your support. I have 2 fastq files: one of the forward sequence and the second is reversed. I reverse complement to the second file using: seqtk seq -r -c SRR14917105_2.fastq > rc_SRR14917105_2.fastq and then cat both forward and reverse-complement to the same file with a newline file between them. When running bowtie2 I'm getting the next error: image The first file is on the next format:

@SRR14879760.1 A00821:293:H35JJDSXY:2:1101:20989:1016 length=150
GNCCAGAAGACTTTTTCCTAGGTTTTCTTCTAGGATTGTTACAGTTTCAGGTCTTGGGTTTAAGTCTTTAATCCATTTTTGTATACGGTGAGAGGTATGGGTTCTCTTAATTTTTGTATATGGTGAGAGGTATTTTTCTGCATATGGCTA
+SRR14879760.1 A00821:293:H35JJDSXY:2:1101:20989:1016 length=150

And the second:

@SRR14879760.1 A00821:293:H35JJDSXY:2:1101:20989:1016 length=150
CGGTGAGAGGTATGGGTTCTCTTAATTTTTGTATATGGTGAGAGGTATTTTTCTGCATATGGCTAGCCAGTTTTCCCAGCACCACTTATTTAATAGAGTCCTTTCCCCAGTGTATATTTTTGTTGACTTTGTCAAAGATCAGTTGATTGG
+
FFFFFF:FF:F:FFFFFFFFFFFFFFFFFFFFFFFF:FFFFF:FFFFFFFFFFFFFFFFFFFFFF:F:FFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:,FF:F

Can you please help?

KarinElimelech commented 1 year ago

Update: Solved it with bowtie2 -x hg38 -1 SRR14879760_1.fastq -2 rc_SRR14879760_2.fastq -S aligned.sam (although it still fails when using macs3 peak calling)

ch4rr0 commented 1 year ago

Hello,

Can you try adding --fr to your command line? According to the manual:

    --fr/--rf/--ff

The upstream/downstream mate orientations for a valid paired-end
alignment against the forward reference strand. E.g., if --fr is
specified and there is a candidate paired-end alignment where mate 1
appears upstream of the reverse complement of mate 2 and the fragment
length constraints (-I and -X) are met, that alignment is valid. Also,
if mate 2 appears upstream of the reverse complement of mate 1 and all
other constraints are met, that too is valid. --rf likewise requires
that an upstream mate1 be reverse-complemented and a downstream mate2 be
forward-oriented. --ff requires both an upstream mate 1 and a downstream
mate 2 to be forward-oriented. Default: --fr (appropriate for Illumina's
Paired-end Sequencing Assay).
ch4rr0 commented 8 months ago

I will be closing this issue. Feel free to reopen if necessary.