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
          Current Approaches to Protein Sequencing
          by seqadmin


          Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
          04-04-2024, 04:25 PM
        • seqadmin
          Strategies for Sequencing Challenging Samples
          by seqadmin


          Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
          03-22-2024, 06:39 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, 04-11-2024, 12:08 PM
        0 responses
        32 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 10:19 PM
        0 responses
        37 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-10-2024, 09:21 AM
        0 responses
        31 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 04-04-2024, 09:00 AM
        0 responses
        53 views
        0 likes
        Last Post seqadmin  
        Working...
        X