Perl script to extract lines with matching ids !!
#!/usr/bin/perl use strict; use warnings; my %patterns; #USAGE: perl extactByIds.pl Idsfile1 file2 > Result # Open file and get patterns to search for open(my $fh2,"2869 days ago
Perl script to extract fasta sequence by matching name/ids !!
...use strict; use warnings; use Text::Trim qw(trim); #Usage perl extractSeqbyID.pl ids.txt seq.fasta Result.fasta $ARGV[2] or die "use extractSeqbyID.pl LIST FASTA OUT\n"...2869 days ago
2865 days ago
Perl subroutine to read and write files
# Input output (InOut) the file # usage: # @array = InOut('read',$file) # $st...rite',$file,\$string) # InOut('write',$file,\@array) #$string = "YO!"; #InOut(...my @file = ; close InOut; return wantarray ? @file : join '', @file;...2859 days ago
Perl script introduces control structures, arrays and hashes.
...strict; use warnings; my @first_array = ('DNA', 'ATGCGTGC', 5, 'RNA', 'AUGC'); print $first_array[0], "\n\n"; # Scalar give...ual size of an array my $size_of_array = scalar(@first_array); my...ze: $another_way_of_getting_size_of_array\n\n"; # Control Loop: for...2856 days ago
Blast script to index and extract sequence !!
...GG TCACTAAATACTTTAACCAATATAGGCATAGCGCACAGACAGATAAAAATTACAGAGTAC # generate the blast database $ makeb...# query the blast database by id and coordinates $ blastdbcmd -db EC -range 100-105 -entry 'NC_011353....2846 days ago
2687 days ago
Calculate ATGC percentage in parallel with perl
#!/usr/bin/perl use strict; use Parallel::ForkManager; use Bio::SeqIO; #usage: perl testParallel.pl my %sequences; my $seqio = Bio::SeqIO-...ID's back to child specific information my $pm = new Parallel::ForkManager($max_procs);...2649 days ago
BASH script for SelfBLAST a genome
...mtools installed in your system #Author: Jitendra Narayan #USAGE: ./selfBlast.sh ex...ds -dbtype nucl -out $MYDB fi if [ $1 = "extract" ] then echo "Extractin...cho "Something went wrong $USER - Contact jitendra" fi echo "Doing alignment...2646 days ago
Extract a range from genome file with perl.
#!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; my $in_file = $ARGV[0]; my $start_pos = $ARGV[1]; my $end_pos = $ARGV[2]; my $in = Bio::SeqIO-...2621 days ago