Read lines from input file – print lines that match a regular expression
#!/usr/bin/perl use strict; use warnings; my $line; #read the line-by-line for each line ask if it matches the regex print it if it matches while($line = ){...2926 days ago
A multilayer perceptron (MLP) neural network in Perl
...#Tanh hidden neurons #Linear output neuron #To include an input bias create an #extra input in the training data #and se...atNum; my $errThisPat; my $outPred; my $RMSerror; my @trainInputs; my @trainOutput; # th...2925 days ago
Find and replace ambiguous characters in fasta file with Perl and Bioperl
...racters.\n" . "If multiple files are given, sequences in all files are marged. If no \n". "argument is given, it will take STDIN as the input\n"; our($opt_h, $opt_m);...2923 days ago
2880 days ago
Perl subroutine to read and write files
# Input output (InOut) the file # usage: # @array = InOut('read',$file) # $string...if($bit eq 'read'){ open InOut,"< $file" or die "Cannot open $file for input: $!\n"; my @file = ;...2874 days ago
2713 days ago
2702 days ago
Perl script to insert the DNA string in genome
#!/usr/bin/perl use warnings; use strict; use Bio::SeqIO; use Bio::Seq; my $file = $ARGV[0]; # input fasta file (genome file) my $out = $ARGV[1]; # output fasta file my...2668 days ago
Extracting FASTA sequences based on position with perl script !!
#!/usr/bin/env perl #Uses: perl sub-seq.pl input.txt range use strict; use warnings; my $end = pop; my $start = pop; local $/ = '>'; while () { chomp;...2630 days ago
Download the genome from NCBI using bash script/command
...# Create a directory with appending G mkdir "G$filename" cd "G$filename" # take action on each file. $f store current file name wget --input $f #cat $f cd .. done...2541 days ago