Hello, I am a bachelor student (biomedical sciences). We are doing a Illumina sequencing task to find out a subjects heritage. Currently, I am struggling with our alignment step and I can't manage to find the answer anywhere. This is my code:
bowtie2 --threads 10 -x Reference/Bowtie2/homosapiens -1 trimOutput/lc_good_1.fastq -2 trimOutput/lc_good_2.fastq -S > alignmentOutput/lc.bowtie.sam
And the error messages:
Error: 0 mate files/sequences were specified with -1, but 1
mate files/sequences were specified with -2. The same number of mate files/
sequences must be specified with -1 and -2.
Error: Encountered internal Bowtie 2 exception (#1)
Command: /cm/shared/apps/bowtie2/2.4.2/bin/../src/bowtie2-2.4.2/bowtie2-align-s --wrapper basic-0 --threads 10 -x Reference/Bowtie2/homosapiens -S -1 -2 trimOutput/lc_good_2.fastq trimOutput/lc_good_1.fastq
(ERR): bowtie2-align exited with value 1
I have read the bowtie2 -help page a hunder times but can't seem to find the solution. Any help is much appreciated!
This is the first time I'm working with a programming language so use simple words in your response :)
I tried
and still got
Tried
And got
Also tried without the "-" at the end of the command, but didn't change anything.
For your reference genome
-x Reference/Bowtie2/homosapiens
homosapiens is a directory or the basename of your index file? In the directory Reference/Bowtie2 you have files name homosapiens.1.bt2 homosapiens.2.bt2 etc?It is the basename, see the answer to GenoMax below
It is the basename, see the answer to GenoMax below
Can you post the output of
ls -l Reference/Bowtie2/homosapiens
? As @quentin54520 says you are likely not using the basename of your bowtie2 index files.As you can see it is a basename of my index file. The bowtie2 manual said I should remove the trailing (.X.bt2) which I think I did by referencing the index with Reference/Bowtie2/homosapiens
the ls -l gives me a an error. Probably because using ls -l does not specify any of the 6 files that are in the bowtie2 directory.
Did you create this index yourself? Generally one needs to have at least a softlink (if not the full file) for the genome multi-fasta file in the directory where the index files are present. Your genome file must have been called
homosapiens.fa
? Make sure there is a softlink or a copy in index directory and try again.BTW:
ls -l Reference/Bowtie2/homosapiens*
should work. I forgot the wildcard before.I did not create the index myself, my teacher did. I'll ask him whether this might be the problem. As for now, I switched to bowtie2 version 2.2.6. which seems to work. Unfortunately, adding CPUs with --thread or -p does not work in this version for me. I have decided to switch to using BWA alignment.
Have you trimmed the files independently? Maybe you are facing this error cause you have different amount of reads in R1 and R2
I have not trimmed the files seperately. This is what i used for trimming:
When doing a fastqc of the trimmed files, i see that both have 506 316 sequences. So there is no difference in reads of R1 and R2