bash script to extract sequence by ids !
...rl one-liner, grep and seqtk subseq to extract the desired fasta sequences: # Create test input: cat > in.fasta BGI_novel_T016313 Solyc03g025...ids_gene_ids.tsv | cut -f1 > ids.selected.txt # Extract fasta sequence that correspond to d...837 days ago
Bash script to split multifasta file !
...rint >> file; }' < multi.fa #OR awk -v chunksize=$(grep ">" multi.fasta -c) 'BEGIN{n=0; chunksize=int...chunk%d.fa",n);} print >> file; n++; next;} { print >> file; }' < multi.fasta #Another great solution is...837 days ago
Multiline fasta to single line fasta !
perl -pe '$. > 1 and /^>/ ? print "\n" : chomp' in.fasta > out.fasta809 days ago
808 days ago
806 days ago
Bash script to convert multiline fasta to single line fasta !
#file.fa is multiline fasta awk '/^>/ {printf("\n%s\n",$0);next; } { printf("%s",$0);} END {printf("\n");}' < file.fa780 days ago
Awk command to keep only short the fasta header !
awk '/^>/ {$0=$1} 1' file.fasta723 days ago
606 days ago
Perl script to find inverted repeats !
...SeqIO; use Bio::Tools::Run::RepeatMasker; my $genome_file = "genome.fasta"; # read genome sequence my $seqio = Bio::SeqIO->new(-file => $genome_file, -format => "fasta"); my $seqobj = $seqio->next...439 days ago
Perl script for chi-squared test !
...ed test of the dinucleotide frequencies of two FASTA files # Last updated by: $Au...ARGV[0]") || die "Can't open $ARGV[0]\n"; my $fasta = new FAlite(\*FILE); # lo...,"$ARGV[1]") || die "Can't open $ARGV[1]\n"; $fasta = new FAlite(\*FILE); # lo...425 days ago