In developing qdod there are several handy tools for aggretating data. Here we will try to list them.
Section on how to get data automatically down from different resources including
Sqlshare
!python {spd}fetchdata.py -s "SELECT ProbeName,GB_ACC,Column2 as sequence,Description FROM [sr320@washington.edu].[GPL11353_array]ar left join [sr320@washington.edu].[Cgigas_EST__Nuc_NCBI_040414_cl]est on ar.GB_ACC=est.Column5" -f tsv -o /Volumes/web/cnidarian/GPL11353_fasta2.tab
Fasta to tab
!perl -e '$count=0; $len=0; while(<>) {s/\r?\n//; s/\t/ /g; if (s/^>//) { if ($. != 1) {print "\n"} s/ |$/\t/; $count++; $_ .= "\t";} else {s/ //g; $len += length($_)} print $_;} print "\n"; warn "\nConverted $count FASTA records in $. lines to tabular format\nTotal sequence length: $len\n\n";' /Volumes/web/cnidarian/oyster.v9.fa > /Volumes/web/cnidarian/cgigas_v9_genome01.tab
Tab to fasta
!awk -F "," '{print ">"$1"\n"$2}' /Volumes/web/cnidarian/GPL11353_v6fasta.csv > /Volumes/web/cnidarian/GPL11353_v6fasta.fa