Hi everyone, this is my first post (fanfare sounds
)
I want to align a series of pair end reads, which I was shown I could do like this:
bwa mem -M -t 30 /...path omitted.../ucsc.hg19.fasta \
file1.fq.gz \
file2.fq.gz \
> aligned_sample1.sam
and that works fine, as the bwa index files are in the same folder as the reference ucsc.hg19.fasta file.
HOWEVER, I now have a series of mouse files, and the reference fasta file and the bwa index files are not in the same folder. I'm logged into a central server to do this work, and the admin has stored the mm10.fa file say in "/...path1.../mouse/mm10/" and has calculated the index files and stored them under "/...path1.../mouse/bwa_indices/"...
so that when I try to run
bwa mem -M -t 30 /...path 1.../mouse/mm10/mm10.fa \
file1.fq.gz \
file2.fq.gz \
> aligned_sample1.sam
it fails because the index files have not been found.
I cannot write to these directories because they're protected, so I can't just move the index files to the same place as the fasta file.
As a workaround, I copied the fasta file and the bwa index files to a new directory, and worked from there. This works, but I'm duplicating data unnecessarily.
I'd like to know how I can specify different paths for the reference fasta file and the bwa index files when using bwa mem as above.
I cannot find that in the documentation, so I suspect it's a very basic question... but then I'm a total beginner on this so please be gentle
![Wink](https://www.seqanswers.com/core/images/smilies/wink.png)
I want to align a series of pair end reads, which I was shown I could do like this:
bwa mem -M -t 30 /...path omitted.../ucsc.hg19.fasta \
file1.fq.gz \
file2.fq.gz \
> aligned_sample1.sam
and that works fine, as the bwa index files are in the same folder as the reference ucsc.hg19.fasta file.
HOWEVER, I now have a series of mouse files, and the reference fasta file and the bwa index files are not in the same folder. I'm logged into a central server to do this work, and the admin has stored the mm10.fa file say in "/...path1.../mouse/mm10/" and has calculated the index files and stored them under "/...path1.../mouse/bwa_indices/"...
so that when I try to run
bwa mem -M -t 30 /...path 1.../mouse/mm10/mm10.fa \
file1.fq.gz \
file2.fq.gz \
> aligned_sample1.sam
it fails because the index files have not been found.
I cannot write to these directories because they're protected, so I can't just move the index files to the same place as the fasta file.
As a workaround, I copied the fasta file and the bwa index files to a new directory, and worked from there. This works, but I'm duplicating data unnecessarily.
I'd like to know how I can specify different paths for the reference fasta file and the bwa index files when using bwa mem as above.
I cannot find that in the documentation, so I suspect it's a very basic question... but then I'm a total beginner on this so please be gentle
![Wink](https://www.seqanswers.com/core/images/smilies/wink.png)
Comment