Bowtie alignment after adapter removal with trimmomatic
1
0
Entering edit mode
8.4 years ago

Dear all,

How can I feed Bowtie2 after trimming the fastaq files through trimmomatic?

The output of the trimmomatic implementation returns 4 files, which can be called let's say paired1, paired2, unpaired1 and unpaired2, and I created the index reference file idx_refile. I therefore used this kind of command:

bowtie2 -x idx_refile -1 paired1 -2 paired2 -U unpaired1, unpaired2 -S output.sam

but I got the following error:

Extra parameter(s) specified: "unpaired2"
Note that if <mates> files are specified using -1/-2, a <singles> file cannot
also be specified. Please run bowtie separately for mates and singles.
Error: Encountered internal Bowtie 2 exception (#1)
(ERR): bowtie2-align exited with value 1

How can I separate the unpaired files? The comma did not work.

Thank you

trimmomatic trimming bowtie alignment • 4.3k views
ADD COMMENT
1
Entering edit mode

You shouldn't have a space after the comma

ADD REPLY
0
Entering edit mode
8.4 years ago
h.mon 35k

The message is pretty clear:

Note that if <mates> files are specified using -1/-2, a <singles> file cannot also be specified.

So you should run once for the paired reads, and again for the singles.

ADD COMMENT
0
Entering edit mode

so it should be like

bowtie2 -x idx_refile paired1 -U unpaired1 -S output1.sam
bowtie2 -x idx_refile paired2 -U unpaired2 -S output2.sam

but then how can I combine the two output files?

ADD REPLY
0
Entering edit mode

Short answer:

samtools merge

Some longer answers here.

ADD REPLY
0
Entering edit mode

I tried with the following:

bowtie2 -x idx_refile -1 paired1 -U unpaired1 -S A.sam
bowtie2 -x idx_refile -1 paired1 -U unpaired1 -S B.sam

samtools view -bS A.sam > A.bam
samtools view -bS B.sam > B.bam

samtools merge output.bam A.bam B.bam

but I got the following error:

[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
Segmentation fault (core dumped)

Where I got it wrong?

Tx

ADD REPLY
0
Entering edit mode

Please, take a bit of time to read the manuals of the programs you are using:

With no options or regions specified, prints all alignments in the specified input alignment file (in SAM, BAM, or CRAM format) to standard output in SAM format (with no header).

You want to use samtools view -h

ADD REPLY

Login before adding your answer.

Traffic: 2673 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