Clump Finding Problem Solved with Perl
...TGAAGAGAAGAGGAAACACGACACGACATTGCGACATAATGTACGAATGTAATGTGCCTATGGC"; my $subStr="?"; my $clump=4; my $kme...print "$name " if $myHash{$name} == $clump; } kmerMatch ($string, $subStr, $kmer); sub kmerMatch...2375 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-0...2373 days ago
Convert fastq to fasta in Perl
use Bio::SeqIO; #convert .fastq.gz to .fasta open my $zcat, 'zcat seq.fastq.gz |' or die $!; my $in=Bio::SeqIO->new(-fh=>$zcat, -format=>'fastq'); my $out=Bio::SeqIO->new(-file=>'>seq.fa...2372 days ago
Fill up the form and blast with perl
...use strict; use warnings; my $mech = WWW::Mechanize->new; my $sequence = 'GCCCGCGGTCTCAGAGATCTCGATATATTATA'; $mech->get('http://www.arabidopsis.org/Blast/'); $mech->submit_form(...2366 days ago
Insert the sequence at desire location in multi-fasta file with Perl
#!/usr/bin/perl use warnings; use strict; use Bio::SeqIO; use Bio::Seq; use File::Copy; #ARGV[0] shoul...wing format --- Keep the coordinate sorted by name+location #GenomechrNam...ould not overlaps --- next postition shold be bigger than firstpos+alienLe...2355 days ago
Create genome scaffolding with Perl
#!/usr/bin/perl use warnings; use...uery [options] =cut sub min { ($a, $b) = @_; return( ($a < $b) ?...b1, $b2) = @_; if(($b1 eq $b2) || ($b1 eq " ") || ($b2 eq...- $tStart; my $sizeDif = abs($qAliSize - $tAliSize); m...match '%s' vs '%s': too many bases trimmed (%d [%d,%d] [%d,%...2350 days ago
Plot the clock using Lastz -gerenal outfile
use strict; use warnings; use Statistics::R ; use List::Util qw(sum); #Usage perl clockPlot.pl Palindrome.palfc 1500 my $R = Statistics::R->new() ; $R->star...2340 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 apple2334 days ago
Remove the duplicated line present only next to each other with Perl
#!/usr/bin/perl use strict; use warnings; { $_ = ; my $next_line; wh...e; } print $_ if eof; } __DATA__ apple apple plum vinegar apple banana banana banana apple2334 days ago
Extract the values between to user defined string with Perl
#!/usr/bin/perl -w use strict; while () {...ocess_record() if /^\s*START/; } sub process_record { my $lin...the first set of lines which are to be extracted END START Ne...the second set of lines which are to be extracted END aasds ttere...2334 days ago