2181 days ago
Perl script to merge LastZ overlaps
#!/usr/bin/perl use strict; use warnings; use 5.010; # Filter out the exact/direct overlaps from tab seperated alignment file. (lastz format=general- ready) # Do not inclide header in lastz outfile # USAGE: perl filterOverlaps.pl infile > outfile open my $fh, '2179 days ago
2177 days ago
Perl script to find palindromic pattern !
...e strict; use warnings; use strict; my %invert; @invert{ qw[ A C G T ] } = qw[ T G C A ]; my $in = do{ local $/; }; chom...$invert{ substr $in, $p1+1, 1 }; my $pals = 0; for my $p2 (...++$pals; } if( $pals ) { my $val=substr( $in, $p1-$pals,...2153 days ago
Install Python locally on shared Linux server !
#Install python to local directory #Firstly, I create a folder in my home directory, download the python source and extract it mkdir ~/python cd ~/python wget https://ww...2152 days ago
Perl script to extract sequence by Ids from multifasta file !
#!/usr/bin/perl -w use strict; my $idsfile = "$ARGV[0]"; my $seqfile = "$ARGV[1]"; my %ids = (); open FILE, $idsfi...FASTA record open FASTA, $seqfile; while () { chomp; my $seq = $_; my ($id) = $s...2150 days ago
2129 days ago
2128 days ago
Perl script to extract a sequence from multifasta with range !
...00 contigs.fasta > contigs-gt300-lte600.fasta my $minlen = shift or die "Error: `minlen` parameter not provided\n"; my $maxlen = shift or die "Error...next unless /\w/; s/>$//gs; my @chunk = split /\n/;...2120 days ago
Perl script to break the contigs by 'N'
...GV[0].parts.scaff"); while ( my $seqobj = $fasta->next_seq()...(); #gets contig sequence my $seq = $seqobj->seq; my $le...NNNNN region in the contig my @regions=(); my @bases=spli..."$new_id $cini $cend\n"; my $linksize=$end-$ini+1; pr...2117 days ago