1766 days ago
1763 days ago
Perl script to run in parellel !
#!/usr/bin/perl use strict; use warnings; use Parallel:...my $file_content = new Bio::SeqIO(-format => 'fasta',-file => "$file"); my $out_content = Bio::SeqIO->newFh(-format => 'fasta', ,-file => ">genomeRES.fa");...1727 days ago
Find and replace in multifasta or fasta header with perl onliner
You have a fasta file and you want to replace: "|" You are told to replace that by "_" perl -i -p -e "s/\|/_/g" genome.fasta -i = inplace editing -p = loop over lines and print each line (after processing) -e = command line script1656 days ago
Samtools commands for bioinformatician !
## count mapped reads samtools view -c -F 2...m ### converting sam file into fasta samtools fasta reads_mapped.sam > reads.fast...samtools mpileup -g -f sal_ref_sej.fasta sal_sej_sorted.bam.bam > sal_...(realign) indels # -f : reference fasta, needed to left align and nor...1644 days ago
Pack a perl program with their dependencies on Ubuntu !
#Follow steps to create your own executable ./web jit@jit-HP-Pro-3335-MT:~/Downloads/a...Jit@jit.aber Sequence Tube Maps: displays multiple genomic sequences in the form...t 5 days ago SequenceTubeMapsdisplaysmulti...1552 days ago
Python script to check sequence length in multifasta file
#!/usr/bin/python from Bio import SeqIO import sys cmdargs = str(sys.argv) for seq_record in SeqIO.parse(str(sys.argv[1]), "fasta"): output_line = '%s\t%i' % \ (seq_record.id, len(seq_record)) print(output_line)1256 days ago
Onliner to split the multifasta to singlefasta files !
#Split the multifasta to singlefasta # Multi fasta #Single fasta awk '$0 ~ "^>" { match($1, /^>([^:]+)/, id); filename=id[1]} {print >> filename".fa"}' sequence.fasta1441 days ago
1443 days ago
get GC across the entire CDS !
#look at GC across the entire CDS. gffread -x - -g | \ seqtk comp - | \ awk -v OFS="\t" '{ print $1, "0", $2, ($4 + $5) / $2 }'1434 days ago