Perl script to reverse complement a DNA sequence !
#!/usr/bin/perl -w $DNA = 'ACGGGAGGACGGGAAAATTACTACGG...print "Here is the starting DNA:\n\n"; print "$DNA\n\n"; $revcom = reverse $DNA; $revcom =~ s/A/T/g; $rev...ere is the reverse complement DNA: WRONG:\n\n"; print "$revc...ere is the reverse complement DNA:\n\n"; print "$revcom\n";...2036 days ago
Perl One-Liner to print only non-uppercase letters
#Go through file and only print words that do not have any uppercase letters. perl -ne 'print unless m/[A-Z]/' dna.fa > dnaOnlyLowercase.fa #To lowercase everything perl -pne 'tr/[A-Z]/[a-z]/' dnaUpperCase.fa >dnawithoutuppercase.fa;1376 days ago
1333 days ago
Commandline for paired end reads simulation with BBMap !
(JitMetaENV) ➜ mixedSample git:(main) ✗ /home/urbe/Tools/bbmap/randomreads.sh ref=m...h=250, mininsert=400, maxinsert=600, gaussian] Writing reference. Executing dna.FastaToChromArrays2 [mixed.fa...983 days ago
Tadpole is 250x faster than SPADes assembler !
lege@jit-Lenovo-ideapad-320-15ISK:~/Downloads/MyTools/Vir$ tadpole.sh Written by Br...tput. outd= Write discarded reads, if using junk-removal flags. dot=...errorpath=1 (ep) For debugging purposes. Jun...969 days ago
Raku script to find palindrome in genomes !
sub is-palindrome(Str $str) returns Bool {....flip; } sub find-palindromes(Str $dna, Int $min-length, Int $max-le...-length -> $length { for 0..^$dna.chars - $length -> $pos {...} } } # Example usage my $dna = "GGATCCATGGCCTAGG"; # examp...417 days ago
Raku script to calculate GC content !
sub calculate-gc-content(Str $sequence) { my $gc-cou...return $gc-count / $total-bases * 100; } my $dna_sequence = "ATGCGCTAAAGCGCGCG...GCGCGCGCGC"; my $gc_content = calculate-gc-content($dna_sequence); say "DNA Sequen...105 days ago
87 days ago
Perl and BioPerl script to extract protein sequences using GFF file !
#!/usr/bin/perl use strict; use warnings; use Bio::DB::Fasta; use Bio::SeqIO; # Paths to your GFF file and genome FASTA file my $gff_file = 'path/to/your/file...87 days ago
Python script to find repeats in the DNA sequence !
def find_repeats(sequence, min_repeat_length=3): repeats = [] for i in range(len(sequence) - min_repeat_length + 1): substring = sequence[i:i...87 days ago