Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnushaC
    Member
    • Sep 2013
    • 78

    #1

    Fastdump and fastq to bam conversion is creating strange problem

    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
  • dpryan
    Devon Ryan
    • Jul 2011
    • 3478

    #2
    Read the usage for fastq-dump, you're executing it wrong. You would have the same problem if you executed it manually (i.e., not via your cluster), which should tell you something. Further, the fact that it's trying to open the file you're specifying for output should also tell you something...

    BTW, remember to strip the path off of a file if you're going to do scripting like this.

    Comment

    • AnushaC
      Member
      • Sep 2013
      • 78

      #3
      Hi ,
      I read the SRA tool kit manual and fast dump syntax is
      fastq-dump mySRA.sra
      I am not understanding why it is trying to open which I am specifying for output . If problem with fastq dump it should file for that only. It is failing for BWA alignment also and could u explain me where I am going wrong and in what cases it will go like this

      Thanks in advance ,
      Anusha.ch

      Comment

      • dpryan
        Devon Ryan
        • Jul 2011
        • 3478

        #4
        Originally posted by AnushaC View Post
        Hi ,
        I read the SRA tool kit manual and fast dump syntax is
        fastq-dump mySRA.sra
        Exactly! It should be obvious from that what you're doing wrong, since you're not doing that!

        I should add that the more general syntax for fastq-dump is:

        Code:
        fastq-dump some_dataset.sra some_other_dataset.sra yet_another_dataset.sra ...
        It should be apparent that what it and you are expecting are different things...

        Comment

        Latest Articles

        Collapse

        • kinpict.com
          Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by kinpict.com
          The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
          Today, 06:37 PM
        • SEQadmin2
          16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
          by SEQadmin2





          NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
          10-30-2026, 06:46 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by SEQadmin2, 11-12-2026, 07:59 AM
        0 responses
        27 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-05-2026, 09:25 AM
        0 responses
        35 views
        0 reactions
        Last Post SEQadmin2  
        Started by SEQadmin2, 11-03-2026, 11:54 AM
        2 responses
        56 views
        0 reactions
        Last Post kinpict.com  
        Started by SEQadmin2, 10-28-2026, 09:57 AM
        0 responses
        175 views
        0 reactions
        Last Post SEQadmin2  
        Working...