Results for "N"

Bio-Scripts

  • 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

  • Reformat the file names with Perl

    #!/usr/bin/perl use strict; use warnings; use File::Copy qw(copy)...d_fh($ARGV[0]); while (my $line = ) { next if $line =...ed $name and defined $code; $hash{$name}{...sub read_fh { my $filename = shift @_; my $fileh...

    2388 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 form...umps in Genome. use strict; use warnings; my %myHash; my $stri...a=0; $aa $max) { $max = $km;} #print "$km\t$myStr\n"; $myHas...

    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_0001.../Tools/SATSUMA/satsuma-code-0 for f in $FILES do if [ ${f: -4} =...e name mkdir $ff $path/SatsumaSynteny -q $ref -t $f -o $ff #...

    2383 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.fasta',...

    2383 days ago

  • Fill up the form and blast with perl

    use WWW::Mechanize; use strict; use warnings; my $mech = WWW::Mechanize->new; my $sequence = 'GCCCGCGGTCTCA...rg/Blast/'); $mech->submit_form( form_name => 'myForm', fields =>...'QueryText' => $sequence, }, ); print $mech->content;

    2377 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 Bi...q; use File::Copy; #ARGV[0] should be in following format --- Keep the coordinate sorted by name+location #...laps --- next postition shold be bigger than firstpos+alienLen open(my...

    2366 days ago

  • Create genome scaffolding with Perl

    #!/usr/bin/perl use warnings; use strict; use English; use Pod::Usage; ## uses pod documentation in usage code use Geto..."pid"}) && $querySeqs{$qName} && $targetSeqs{$tName}){...e}{fullName} = sprintf("%s [%s %s]", $newSeqID, $s...

    2360 days ago

  • Plot the clock using Lastz -gerenal outfile

    use strict; use warnings; use Statistics::R ; use...#Usage perl clockPlot.pl Palindrome.palfc 1500 my $R = Stat...() ; $R->startR ; my $fileN=$ARGV[0]; my $mSize=$ARGV[1]...%pHash; while() { chomp; next if /^$/; #next if empty...$score; } my $allKeys=join ',', @allKeys; my $allFreq=j...

    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 apple

    2345 days ago