Results for "C"

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, '

    2355 days ago

  • Reformat the file names with Perl

    #!/usr/bin/perl use strict; use warnings; use File::Copy qw(copy);; $| = 1; my %hash; my @files = glob "*.scf"; if (!$ARGV[0]){ print...#next if $. == 1; my ($lichenName, $name, $code) = split...$hash{$name}{code}= $code; } #Chec one by one for (0..$#file...

    2353 days ago

  • Clump Finding Problem Solved with Perl

    #Find patterns forming clumps in a string. #Given: A stri...k, L, and t. #Return: All distinct k-mers forming (L, t)-clumps in Genome. use strict...GAGTGAAGAGAAGAGGAAACACGACACGACATTGCGACATAATGTACGAATGTAATGTGCCTATG...nt "$name " if $myHash{$name} == $clump; } kmerMatch ($string...

    2351 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/SA...file..." ff=$(basename "${f%.*}") echo $ff # take action on eac...

    2349 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,...

    2348 days ago

  • Fill up the form and blast with perl

    use WWW::Mechanize; use strict; use warnings; my $mech = WWW::Mechanize->new; my $sequence = 'GCCCGCGGTCTCAGAGATCTCGATATATTATA'; $mech->get('http://w...astTargetSet' => 'ATH1_pep', 'QueryText' => $sequence, }, ); print $mech->c...

    2342 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] should be in following format --- Keep the coordinate sorted by name+locat...

    2331 days ago

  • Create genome scaffolding with Perl

    ...erl use warnings; use strict; use English; use Pod::Usage; ## uses pod documentation in usage code use Getopt::Long qw(:config auto_version auto_help p...t(STDERR "Loading query sequences into memory..."); open(my...$i = 0; $i {"prefix"}, $nextScaffoldID++); if(!exists...

    2326 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->startR ;...Freq); my %pHash; while() { chomp; next if /^$/; #next if...t if $pHash{$val} > 10; my @sChr = split '\_', $val; my $s...

    2316 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

    2310 days ago