Forum Discussion

dinna550's avatar
dinna550
Copper Contributor
Mar 02, 2021

problem in conversion sra to fastq

I wrote code:

#Import the data table into a variable
$sorceFolder= import-csv 'elife-526-s.csv'
$files=$sorceFolder|select SRA
#Convert any SRA file to fastq
$list = $sorceFolder |where {$_."SRA" -eq "ERR1654119"}
foreach($f in $list){
prefetch $f --max-size 100G --progress -O C:\Users\user\Desktop\labHebrew\RhizosphereMicrobiome\Data
fasterq-dump --split-files --threads 32 --stdout $f -O C:\Users\user\Desktop\labHebrew\RhizosphereMicrobiome\Data
}

 

 

 

And I got a comment:

prefetch : The term 'prefetch' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:2 char:1
+ prefetch $f --max-size 100G --progress -O C:\Users\user\Desktop\labH ...
+ ~~~~~~~~
+ CategoryInfo : ObjectNotFound: (prefetch:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

fasterq-dump : The term 'fasterq-dump' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try again.
At line:3 char:1
+ fasterq-dump --split-files --threads 32 --stdout $f -O C:\Users\user ...
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (fasterq-dump:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

 

 

what is the problem?

1 Reply

  • farismalaeb's avatar
    farismalaeb
    Steel Contributor
    It seems you are calling an external application via powershell script.
    try to add .\ before the application or call it by full path.

Resources