Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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


    • #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


      • #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

        • seqadmin
          Non-Coding RNA Research and Technologies
          by seqadmin


          Non-coding RNAs (ncRNAs) do not code for proteins but play important roles in numerous cellular processes including gene silencing, developmental pathways, and more. There are numerous types including microRNA (miRNA), long ncRNA (lncRNA), circular RNA (circRNA), and more. In this article, we discuss innovative ncRNA research and explore recent technological advancements that improve the study of ncRNAs.

          [Article Coming Soon!]...
          Today, 08:07 AM
        • seqadmin
          Recent Developments in Metagenomics
          by seqadmin





          Metagenomics has improved the way researchers study microorganisms across diverse environments. Historically, studying microorganisms relied on culturing them in the lab, a method that limits the investigation of many species since most are unculturable1. Metagenomics overcomes these issues by allowing the study of microorganisms regardless of their ability to be cultured or the environments they inhabit. Over time, the field has evolved, especially with the advent...
          09-23-2024, 06:35 AM
        • seqadmin
          Understanding Genetic Influence on Infectious Disease
          by seqadmin




          During the COVID-19 pandemic, scientists observed that while some individuals experienced severe illness when infected with SARS-CoV-2, others were barely affected. These disparities left researchers and clinicians wondering what causes the wide variations in response to viral infections and what role genetics plays.

          Jean-Laurent Casanova, M.D., Ph.D., Professor at Rockefeller University, is a leading expert in this crossover between genetics and infectious...
          09-09-2024, 10:59 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 10-02-2024, 04:51 AM
        0 responses
        13 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 10-01-2024, 07:10 AM
        0 responses
        23 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 09-30-2024, 08:33 AM
        1 response
        29 views
        0 likes
        Last Post EmiTom
        by EmiTom
         
        Started by seqadmin, 09-26-2024, 12:57 PM
        0 responses
        19 views
        0 likes
        Last Post seqadmin  
        Working...
        X