Perl script to reverse complement a DNA sequence !
#!/usr/bin/perl -w $DNA = 'ACGGGAGGACGGGAAAATTACTACGGCATTAGC';...print "Here is the starting DNA:\n\n"; print "$DNA\n\n"; $revcom = reverse $DNA; $revcom =~ s/A/T/g; $rev..."Here is the reverse complement DNA: WRONG:\n\n"; print "$revc..."Here is the reverse complement DNA:\...2044 days ago
1726 days ago
Installing docker for Bioinformatics on Ubuntu !
jit@jit-HP-Pro-3335-MT:~/Downloads$ sudo apt-get remove docker docker-engine docker...n wait Block until one or more containers stop, then print their exit codes Run 'docker COMMAND --help...1514 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;1384 days ago
1341 days ago
Commandline for paired end reads simulation with BBMap !
(JitMetaENV) ➜ mixedSample git:(main) ✗ /home/urbe/Tools/bbmap/randomreads.sh ref=mixed.fa out=reads_BBMAP250.fq...h=250, mininsert=400, maxinsert=600, gaussian] Writing reference. Executing dna.F...991 days ago
Raku script to find palindrome in genomes !
sub is-palindrome(Str $str) returns Bool { $str.=uc; # convert to u....flip; } sub find-palindromes(Str $dna, Int $min-length, Int $max-le...-length -> $length { for 0..^$dna.chars - $length -> $pos {...} } } # Example usage my $dna =...425 days ago
Raku script to calculate GC content !
sub calculate-gc-content(Str $sequence) { my $gc-count = $sequence.comb(//).elems...return $gc-count / $total-bases * 100; } my $dna_sequence = "ATGCGCTAAAGCGCGCG...GCGCGCGCGC"; my $gc_content = calculate-gc-content($dna_s...112 days ago
95 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....95 days ago