Perl script to reverse complement a DNA sequence !
#!/usr/bin/perl -w $DNA = 'ACGGGAGGACGGGAAAATTACTACGGCATTAGC'; print "Here is the start...mplement DNA: WRONG:\n\n"; print "$revcom\n"; print "\nThat was a bad algorithm, and the r...2043 days ago
Finding Kmers from fasta sequence file
Save it in sample.fa >test TAATGCCATGGGATGTT jellyfish count -m 3 -s 100000 sample.fa -o sample.jf jellyfish dump -c sample.jf It return TGT 1 GAT 1 GGG 1 GGA 1 CAT 1 TGC 1 TAA 1 GCC 1 CCA 1 GTT 1 TGG 1 ATG 3 AAT 11972 days ago
Perl script to split fasta sequence and create overlaps
#!/usr/bin/perl use strict; use warnings; my $len = 5000; my $over = 200; my $seq_id=$ARGV[0]; my $seqFile = $ARGV[1]; my $seq; open(my $fh, "1972 days ago
Perl script to run in parellel !
...ger; use Bio::SeqIO; my ($sequence_data_ref) = parse_genome_files($ARGV[0]); my %genome=%{$sequence_data_ref}; my $n_processes...processes ) { $pm->start and next; my $count = 0; f...my $file=shift; my (%sequence_data); my $file_content...1687 days ago
Perl subroutine to creating kmer !
sub k_mers { my ($sequence, $k) = @_; my $len = length($sequence); my @result = (); for (my $i = 0; $i1567 days ago
Bash script to download SRA file !
#We can use the sratoolkit to directly pull the sequence data (in paired FASTQ format) from the archive. fastq-dum...ASTQ for further processing. The --split-files part of the command ensures we get two files, one for the first and secon...1559 days ago
Pack a perl program with their dependencies on Ubuntu !
...opt-argvfile-perl libmodule-scandeps-perl libmodule-signature-perl lib...opt-argvfile-perl libmodule-scandeps-perl libmodule-signature-perl lib...4;jit.aber SvABA: Structural variation and indel detection by local assemblyBy...SvABAStructuralvariationindeldetectionlocalassembly...1511 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)1216 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.fasta1401 days ago
1402 days ago