1215 days ago
2142 days ago
BioPerl to convert between sequence formats from Fasta to Genbank
...r/local/bin/perl -w # Sequence formats to choose: Fasta, EMBL. GenBank, Swissprot, PIR and GCG use Bio::SeqIO; $inFile = "BRCA2.fa"; $in = Bio::SeqIO->newFh('-file' => "$inFile" ,...2914 days ago
2914 days ago
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 = ){...2915 days ago
Parse a genbank file using regular expressions
#! /usr/local/bin/perl -w $genbank = "genbank_file.txt"; open (GENBANK, $genbank) || die "cannot open $gb_report for reading: $!"; # Flag for multiline translation; 1 means...2915 days ago
Perl script to Mutate a DNA Sequence
...on results. # While executing this script it asks for the file name of the DNA sequence. # If the DNA sequence file is not in the same directory....txt # In Linux : /home/user/sequence/rnafile.txt use File::Path; print "ENTER THE FI...2914 days ago
Perl script to count the number of Adenine, Thymine, Guanine and Cytosine in your DNA Sequence
...e executing this script it asks for the file name of the DNA sequence. If the sequence file is not available in the same...y of this script, enter the name of the file along with the path. In wi...chomp $dna_filename; unless ( open(DNAFILE, $dna_filename) ) { print...2914 days ago
Retrieve NCBI GenBank records with a range of accession numbers
...ery => undef, outputFile => undef, database =>...$param{query}, 'o|output_file=s' => \$param{outputFile},...or !( defined( $param{outputFile} ) ) or !( defined( $par...t; } open( my $OUTFILE, ">" . $param{outputFile} )...2914 days ago
Extract a random sequence from a file
#!/usr/local/bin/perl -w use strict; use warnings; use autodie; use List::Util qw/ shuffle /; my $outputfile = 'randomoutput.txt'; open my $in_fh, '', $outputfile; my $size = 21; my $cou...2913 days ago