Question: Bowtie alignment after adapter removal with trimmomatic
0
gravatar for luigi.marongiu
4.0 years ago by
United Kingdom
luigi.marongiu0 wrote:

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.

 

ADD COMMENTlink modified 4.0 years ago by h.mon27k • written 4.0 years ago by luigi.marongiu0
1

You shouldn't have a space after the comma

ADD REPLYlink written 4.0 years ago by colin.kern510
0
gravatar for h.mon
4.0 years ago by
h.mon27k
Brazil
h.mon27k wrote:

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 COMMENTlink written 4.0 years ago by h.mon27k

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 REPLYlink written 3.9 years ago by luigi.marongiu0

Short answer:

samtools merge

Some longer answers here.

ADD REPLYlink written 3.9 years ago by h.mon27k

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 REPLYlink modified 3.9 years ago • written 3.9 years ago by luigi.marongiu0

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 REPLYlink modified 3.9 years ago • written 3.9 years ago by h.mon27k
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: 1699 users visited in the last hour