sed '/^[^>]/ y/uU/tT/' uracil.fasta > thymine.fasta
Piece of cake.
sed '/^[^>]/ y/uU/tT/' uracil.fasta > thymine.fasta
Piece of cake.
As much as I hate FTP, there situations where one must use it. I finally have settled on the best way to get an entire directory, with recursive file retrieval:
lftp -e "mirror dir1/subdir2/subdir3" -u username,password ftphost.domain.com
Of course, FTP must die, but until then, I am glad there is lftp.
cat temp.fa | parallel -j 10 --block 100k --recstart '>' --pipe blastn -evalue 0.01 -outfmt 6 -db refseq_genomic -query - > result.txt
There is a great answer on stack overflow showing how to feed one output stream into multiple processes. It is a little bit of a hack of the excellent tool tee, which I've been using for some time. Normally, tee take stout and writes it to a file, while passing it along to stout. This solution provided on s.o. shows how to hack this with the bash trick >(process) -- so as far as tee knows, it is writing to 2 or more files, but the "files" are actually background processes.
This syntax is bash-dependent, so won't work in sh, and this will likely come up if you're using system() in, say, perl. There is another excellent answer on stack overflow on how to deal with this.
Side note: Using the <(command) trick, my post from March 16 can now be written:
paste <(grep -v "#" hsa.gff | cut -f 1,4,5,9) <(grep -v "#" hsa.gff | cut -f 6,7) | sed s/^/chr/ >mirbase18.bed
## get mirbase18 annotation and convert to a bed like format
wget ftp://mirbase.org/pub/mirbase/CURRENT/genomes/hsa.gff
grep -v "#" hsa.gff | cut -f 1,4,5,9 >mirbase18.temp1
grep -v "#" hsa.gff | cut -f 6,7 >mirbase18.temp2
paste mirbase18.temp1 mirbase18.temp2 | sed s/^/chr/ >mirbase18.bed
Bioinformatic databases grow like kudzu, so I'll no doubt be referring to this directory in the coming year.
http://www.oxfordjournals.org/nar/database/c/
How can I use wget to get a recursive directory listing of an entire FTP site?
yes, wget --no-remove-listing ftp://myftpserver/ftpdirectory/ will get and retain a directory listing for a single directory (which was discussed here)
but, wget -r --no-remove-listing ftp://myftpserver/ftpdirectory/ will recurse and download an entire site
so, if you want to get the recursive directory structure, but not download the entire site, try wget -r --no-remove-listing --spider ftp://myftpserver/ftpdirectory/