Extract the fastq sequence with range in Perl
use Bio::DB::Fasta; open(POSITIONS,"positions.txt"); while(){ chomp; my ($seqName,$begin,$end) = split(/\s/); my $db = Bio::DB::Fasta->new('allGenomeContacted.fa'); my $seq = $db->seq("$seqName", $begin => $end); print "$seq\n"; } close(POSITIONS);2520 days ago
Genetic Algorithms demonstration with word DNA in Perl
...} = 0 } } if (0 == $survived) { die "No individuals survived, dying p...idual) unless $individual->{parent}; } while (not defined $individual); pus...lit '', join '', @dictionary; } # there is no easy way to avoid this exhaus...2424 days ago
Convert newline formated sequence into fasta format with perl
use strict; use warnings; my $filename = $ARGV[0]; open(my $fh, '2422 days ago
Calculate Dinucleotide Frequency with Perl
#!/usr/bin/perl -w use strict; my ($genome, $head, $tail); my (%mono_nt, %di_nt); $/ = ">"; open my $fasta, '2390 days ago
Clump Finding Problem Solved with Perl
#Find patterns forming clumps in a string. #Given: A string Genome, and integers k, L, and t. #Return: All distinct k-mers forming (L, t)-clumps in Genome. use strict; use warnin...2386 days ago
Loop over with all files in a directory in bash
#!/bin/bash FILES=/media/ComparativeGenomics/ncbi-genomes-2017-11-13/* ref=/media/ComparativeGenomics/ncbi-genomes-2017-11-13/GCA_000196735.1_ASM19673v1_genomic.fna path=/home/urbe/Tools/SATSUMA/satsuma-code...2384 days ago
Insert the sequence at desire location in multi-fasta file with Perl
...e in following format --- Keep the coordinate sorted by name+location #GenomechrName locationStart AlienGene AlienLength # The coordinate should not overlaps --- next postition...2366 days ago
Create genome scaffolding with Perl
...NAME psl_scaffolder.pl - use self-mapped PSL file to scaffold a genome =head1 SYNOPSIS ./psl_scaffolder.pl -q...pod2usage({-exitVal => 1, -message => "Error: Unknown command-line option or "....2361 days ago
Plot the clock using Lastz -gerenal outfile
...alindrome.palfc 1500 my $R = Statistics::R->new() ; $R->startR ; my $fileN=$ARGV[0]; my $mSize=$ARGV[1]; open (my $fh2, $fileN) or die "Could not open file $fileN $!"; my (@...2351 days ago
Remove duplicate lines with perl
#! perl -sw use strict; my %lines; #open DATA, $ARGV[0] or die "Couldn't open $ARGV[0]: $!\n"; while () { print if not $lines{$_}++; } __DATA__ apple apple plum vinegar apple banana banana banana apple2345 days ago