Thanks for replying.. It works.
• 0 views
•
link
Dear all I have a file containing genome Ids like
470.771
470.773
......so on upto 1000
and I need to automate a command for all 1000 genome id. Command is
p3-genome-fasta --contig 470.771 > out.contig
and I need a folder containing all the downloaded files. Can anybody help me out with this task?
for i in 470.{771..1000}
do
p3-genome-fasta --contig ${i} > out_${i}.contig
done
What do you mean by "a folder"? What does this command produce?
Not sure if your output need to be renamed, but here is in Perl:
#!/usr/bin/perl
use strict;
use warnings;
while (<>) {
chomp;
my $id = $_;
system("p3-genome-fasta --contig $id > out_$id.contig")
}
so you can run as perl run.pl < file_with_ids.txt
Thanks for replying.. It works.
Log in to answer this question.
try this and let me know if this is what you want:
if you have the ids in text file (ids.txt), try this:
remove dry-run to execute the command.