Results for "fasta"

Tags

  • Clean the FASTA file

    Mostly FASTA file contain NNN characters, which can be replace by random A T G C character with this perl script. It also print the FASTA sequence name, N's counts, nucleotide count and percentage details at command prompt/standard output.  

    Tags: Fasta, Clean, Perl, NNN charaters

    3847 days ago

  • perl -nle 'if (/^>/) { $sl = 0; print; next } next if ($sl >= 200); $_ = substr($_, 0, 200-$sl) if ($sl + length($_) > 200); $sl += length($_); print;' file.fa >new.fa #Perl #Extract #Fasta

    Tags: Perl, Extract, Fasta

    3602 days ago

  • Remove N from a fasta file. Go to vi editor, type :%s/N\{25,\}//g and press enter. #Vim #vi #N #Replace #Fasta

    Tags: Vim, vi, N, Replace, Fasta

    3602 days ago

  • Remove the blank space from a fasta file. perl -nlwe 'tr/ //d; print if length' fileName #Delete #Space #Fasta #Perl #Oneliner

    Tags: Delete, Space, Fasta, Perl, Oneliner

    3602 days ago

  • Extract the numeric values from the multiple FASTA sequence file.

    I have a multiple fasta sequence file (~12GB size) with certain coordinate information:> chr13-/454-4567654 (2347645)AGTGACTGACTGAAGTGACTGA > chr14-/524-8367954 (6535786)AGTGACTGAAGTGACTGAThe fasta sequence string would always have only one or more continuous stretch of numbers, like ...

    Tags: Extract, Number, Fasta, Coordinates

    3628 days ago

  • FastaQ 2 Fasta Oneliner: paste - - - -< totalRNA_placental_1.fastq | perl -pale'$_="@F[0..1]"'|tr "\^@" "\>" | perl -pale 's/\s/\n/g' #Oneliner #NGS #FastaQ #Fasta

    Tags: Oneliner, NGS, FastaQ, Fasta

    3616 days ago

  • To count number of fasta entries, I use: grep -c '^>' mySequences.fasta #Perl #Count #Number #Fasta #Linux #Grep

    Tags: Perl, Count, Number, Fasta, Linux, Grep

    3557 days ago

  • Sort FASTA sequence by length: cat f1.fasta| awk '{if($0 ~ /^>/){printf "%st", $0}else{print length($0)"t"$0}}'| sort -k2n,2| awk '{print $1"n"$3}' > sequence.fasta #Sort #Fasta #Trick #Onliner

    Tags: Sort, Fasta, Trick, Onliner

    3169 days ago

  • Extract sequences by their ID from a fasta file. perl -ne 'if(/^>(\S+)/){$c=$i{$1}}$c?print:chomp;$i{$_}=1 if @ARGV' ids.txt sample1.fa #Extract #Sequences #IDs #Fasta #Perl #Trick #Oneliner

    Tags: Extract, Sequences, IDs, Fasta, Perl, Trick, Oneliner

    3142 days ago

  • Remove the fasta description and just keep the identifier. perl -p -i -e 's/>(.+?) .+/>$1/g' sample1.fa #Perl #Oneliner #Trick #Tips #Fasta #Identifier #Remove

    Tags: Perl, Oneliner, Trick, Tips, Fasta, Identifier, Remove

    3142 days ago