BWA MEM fail to open file for output SAM
0
0
Entering edit mode
2.7 years ago
nayeona.hi ▴ 60

I am practicing to change fastaq into sam file via BWE in ubuntu.

I used index file of 'GRCh37_latest_genomic.fna' (given) with 2 trimmed fastq files.

commands were like below:

    sudo ./bwa-0.7.17/bwa mem -t 6 
 /data/GRCh37_latest_genomic.fna 
/data/trimmed_fasq/trimmed_QC18010001_1.fastq 
/data/trimmed_fastq/trimmed_QC18010001_2.fastq > /data/QC18010001_pe.sam

The results were:

-bash: data/QC18010001_pe.sam: No such file or directory
  1. permission checked - 777
  2. disk usage checked - 22GB left
  3. index files: generated index files for GRCh37_latest_genomic.fna

Q. Why No such file appears for command ">" or -o ? I don't know what the problem is.

sam index bwa output • 1.9k views
ADD COMMENT
2
Entering edit mode
  sudo ./bwa-0...

please don't.

ADD REPLY
1
Entering edit mode

-bash: data/QC18010001_pe.sam: No such file or directory

it's not a bwa error, it's a bash error. did you put some backslash at the end of the lines ?

./bwa-0.7.17/bwa mem -t 6 \
 /data/GRCh37_latest_genomic.fna \ 
/data/trimmed_fasq/trimmed_QC18010001_1.fastq \
/data/trimmed_fastq/trimmed_QC18010001_2.fastq > /data/QC18010001_pe.sam
ADD REPLY
0
Entering edit mode

Yes, those lines for just readability. Thanks. I suspect it might be another bash error, though.

ADD REPLY
0
Entering edit mode

Yes, the path to the folder is most likely incorrect, this is why I asked for that pwd output.

ADD REPLY
0
Entering edit mode

If your user has write permission in that directory you don't have to run the BWA as sudo. The R1 file path is missing a t it should be /data/trimmed_fastq/trimmed_QC18010001_1.fastq. Also, make sure you are using the correct file extension (.fastq/.fastq.gz).

ADD REPLY
0
Entering edit mode

What is the output of pwd when running it while being in the folder that this screenshot is from?

ADD REPLY

Login before adding your answer.

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