Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • ThePresident
    replied
    Originally posted by JamieHeather View Post
    Just noticed that the solution I posted earlier doesn't work if you use the --split flag; when required I use this:

    Code:
    for i in *sra; do fastq-dump --split-3 $i; done
    Saved my life man!

    TP

    Leave a comment:


  • JamieHeather
    replied
    Just noticed that the solution I posted earlier doesn't work if you use the --split flag; when required I use this:

    Code:
    for i in *sra; do fastq-dump --split-3 $i; done

    Leave a comment:


  • genomeHunter
    replied
    If you have multiple cores, this could be even better:

    find . -name *.sra | xargs -P $NUM_CORES -n 1 fastq-dump

    My disk can easily handle 16 simultaneous dumps.

    Cheers,
    GH
    Last edited by genomeHunter; 07-25-2013, 07:46 AM. Reason: Added find.

    Leave a comment:


  • JamieHeather
    replied
    Just like that - works fine in bash anyway. If you have any files that aren't .sras in the directory you'll have to get a bit more specific, like so (with a little bit of tidying up after):

    Code:
    fastq-dump *.sra
    rm *.sra

    Leave a comment:


  • caa5042
    replied
    Hi Jamie. You mean type the code just like that? with no loop or any of the other code?

    Leave a comment:


  • JamieHeather
    replied
    I feel like we've missed the easiest solution:

    Code:
    fastq-dump *

    Leave a comment:


  • chadn737
    replied
    Try this, its what I use.

    Code:
    DIR="$1/*.sra"
    
    for file in $DIR
    
    do
    
    /path/to/fastq-dump $file
    
    done

    Leave a comment:


  • GenoMax
    replied
    Have you tried providing full path to the SRA files in the for loop?

    Code:
    for fn in *.sra
    do ./sratoolkit.2.3.2-5-mac-64/bin/fastq-dump /full_path_to/"$fn".sra
    done
    When you say it is not working what does that exact mean? Are you getting errors or nothing is happening.

    Leave a comment:


  • caa5042
    replied
    it says /bin/bash when i run echo $SHELL

    Leave a comment:


  • Richard Finney
    replied
    What shell are you running?

    type "echo $SHELL" at the command prompt.

    The syntax I provided is "bash shell".

    You can run bash by simply typing "bash" and hit return at the command line.

    Leave a comment:


  • caa5042
    replied
    I think the terminal is just not responding to for loops...i dont get an error or anything either

    any other ideas?

    Leave a comment:


  • Richard Finney
    replied
    Get this to work


    for fn in *.sra
    do ls -l ${fn}
    done

    Leave a comment:


  • caa5042
    replied
    hmm that didnt work either

    and how do I debug using ls?

    Leave a comment:


  • Richard Finney
    replied
    get rid of the ".sra" at the end of the command line in the middle of the for loop.

    You can debug by just using ls instead of the fastqdump command ... like this ...

    Leave a comment:


  • caa5042
    started a topic Convert multiple sra files to fastq format

    Convert multiple sra files to fastq format

    Hi guys,

    I am trying to write a for loop in the terminal (im on a mac) to convert several .sra files to fastq format.

    SO this command works for just a single file:

    ./sratoolkit.2.3.2-5-mac-64/bin/fastq-dump ./SRR770514.sra

    Now I'm trying to use a for loop to do the same thing for multiple files. This is what I have:

    for fn in *.sra
    do ./sratoolkit.2.3.2-5-mac-64/bin/fastq-dump ./"$fn".sra
    done

    but its not working...i've tried several variations..like "$fn.sra" and even tried without the quotes but nothing works..please help

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.

    Nobel Prize for MicroRNA Discovery
    This week,...
    10-07-2024, 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

ad_right_rmr

Collapse

News

Collapse

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