Hi All,
Can any body explain me why it is going wrong
I am trying to convert sra to fastq and fastq to bam conversion but it is trying to open my destination file instead of righting to destination file can any body explain me why it is going like this way
#!/bin/bash
#PBS -l nodes=2pn=2
for files in /raid/development/anusha/python_test/shelltest/fetal_brain_sra/*.sra
do
OUT=(${files%.sra}.fastq)
#fastq-dump $files /raid/development/anusha/python_test/shelltest/ttbrianshell/$OUT
#fastq-dump $files > $1/$OUT
fastq-dump $files /raid/development/anusha/python_test/shelltest/ttbrianshell/$OUT
#fastq-dump $files /raid/development/anusha/python_test/shelltest/fb_fq_test/$OUT
#fastq-dump $files /raid/development/anusha/python_test/shelltest/fastqbwa/$OUT
script tried to open:
'/raid/development/anusha/python_test/shelltest/ttbrianshell//raid/development/anusha/python_test/shelltest/fetal_brain_sra/SRR203400.fastq'
same is the case with fastq to bam conversion
#!/bin/bash
#PBS -l nodes=2pn=2
#PATH="/raid/development/anusha/python_test/shelltest/fb_fq_test/"
#OPATH="raid/development/anusha/python_test/shelltest/fb_bam_test"
for files in /raid/development/anusha/python_test/shelltest/fastqbwa/*.fastq #/raid/development/anusha/python_test/shelltest/fb_fq_test/*.fastq
do
OUT=(${files%.fastq}.bam)
ref="/raid/references-and-indexes/hg19/bwa_new/hg19.fa"
#bwa aln -t 4 $1 $files |bwa samse $1 - $files |samtools view -bS - > $2 /$OUT #/raid/development/anusha/python_test/shelltest/fb_bam_test/$OUT
bwa aln -t 4 $ref $files |bwa samse $ref - $files > $1/$OUT #/raid/development/anusha/python_test/shelltest/fetalbrain_bwa_sam/$OUT
# bwa aln -t 4 $ref $files |bwa samse $ref - $files -|samtools view -bS - > /raid/development/anusha/python_test/shelltest/test_bwa_bam/$OUT
done
write to the disk... anusha@cn1:/raid/development/anusha/python_test/shelltest/fastqbwa> for files in "/raid/development/anusha/python_test/shelltest.fastq}.bam); ref="/raid/references-and-indexes/hg19/bwa_new/hg19.fa"; bwa aln -t 4 $ref $files |bwa samse $ref - $files > "raid/development/anusha/python_test/shelltest/ttbrianshell"/$OUT
> done
-bash: raid/development/anusha/python_test/shelltest/ttbrianshell//raid/development/anusha/python_test/shelltest/fastqbwa/*.bam: No such file or directory
[bwa_aln] 17bp reads: max_diff = 2
Can any body explain me why it is going wrong
I am trying to convert sra to fastq and fastq to bam conversion but it is trying to open my destination file instead of righting to destination file can any body explain me why it is going like this way
#!/bin/bash
#PBS -l nodes=2pn=2
for files in /raid/development/anusha/python_test/shelltest/fetal_brain_sra/*.sra
do
OUT=(${files%.sra}.fastq)
#fastq-dump $files /raid/development/anusha/python_test/shelltest/ttbrianshell/$OUT
#fastq-dump $files > $1/$OUT
fastq-dump $files /raid/development/anusha/python_test/shelltest/ttbrianshell/$OUT
#fastq-dump $files /raid/development/anusha/python_test/shelltest/fb_fq_test/$OUT
#fastq-dump $files /raid/development/anusha/python_test/shelltest/fastqbwa/$OUT
script tried to open:
'/raid/development/anusha/python_test/shelltest/ttbrianshell//raid/development/anusha/python_test/shelltest/fetal_brain_sra/SRR203400.fastq'
same is the case with fastq to bam conversion
#!/bin/bash
#PBS -l nodes=2pn=2
#PATH="/raid/development/anusha/python_test/shelltest/fb_fq_test/"
#OPATH="raid/development/anusha/python_test/shelltest/fb_bam_test"
for files in /raid/development/anusha/python_test/shelltest/fastqbwa/*.fastq #/raid/development/anusha/python_test/shelltest/fb_fq_test/*.fastq
do
OUT=(${files%.fastq}.bam)
ref="/raid/references-and-indexes/hg19/bwa_new/hg19.fa"
#bwa aln -t 4 $1 $files |bwa samse $1 - $files |samtools view -bS - > $2 /$OUT #/raid/development/anusha/python_test/shelltest/fb_bam_test/$OUT
bwa aln -t 4 $ref $files |bwa samse $ref - $files > $1/$OUT #/raid/development/anusha/python_test/shelltest/fetalbrain_bwa_sam/$OUT
# bwa aln -t 4 $ref $files |bwa samse $ref - $files -|samtools view -bS - > /raid/development/anusha/python_test/shelltest/test_bwa_bam/$OUT
done
write to the disk... anusha@cn1:/raid/development/anusha/python_test/shelltest/fastqbwa> for files in "/raid/development/anusha/python_test/shelltest.fastq}.bam); ref="/raid/references-and-indexes/hg19/bwa_new/hg19.fa"; bwa aln -t 4 $ref $files |bwa samse $ref - $files > "raid/development/anusha/python_test/shelltest/ttbrianshell"/$OUT
> done
-bash: raid/development/anusha/python_test/shelltest/ttbrianshell//raid/development/anusha/python_test/shelltest/fastqbwa/*.bam: No such file or directory
[bwa_aln] 17bp reads: max_diff = 2
Comment