Create genome scaffolding with Perl
#!/usr/bin/perl use warnings; use strict; use English; use Pod::Usage; ## uses pod documentation in usage code use Getopt::Long qw(:config auto_version auto_h...2311 days ago
853 days ago
Perl script to remove fasta sequences in multifasta file with certain length threshold
#!/usr/bin/perl use strict; use warnings; my $minlen = shift or die "Error: `minlen` parameter not provided\n"; { local $/=">"; while() { cho...2254 days ago
Perl script to convert fastq to fasta file
...ect $seqret->run({-sequence => $infile, -sformat1 => 'fastq', -outseq => $outfile, -osformat => 'fasta'});2254 days ago
Perl script to read multi fasta sequence one by one
...s; #USAGE #perl rohanRun.pl seq.fa my $outfile='tmp.fa'; my $fastaSeq_ref = readfasta ("$ARGV[0]"); my %fastaSeq =...") or die "couldn't open the file $outfile $!"; print OUT "$key\n$fastaSeq{$key}\n"; } sub re...2224 days ago
2212 days ago
Perl script to find coding regions in DNA sequences
...(second file) if (!open(SEQUENCE,"< $filesequence")) { print "dnaloglkh.pl: the file $filesequence can not be opened\n"; exit(1); } # FASTA format: # >header containin...2158 days ago
Mapping with BWA-mem or BWA-sampe in one go with python script !
...pe in one go. An example call for mapping with this script is python reads_to_ctg_map.py /path/to/lib1_A.fq /path/to/lib1_B.fq /path/to/contigs.fasta --threads N where N is an in...2127 days ago
Perl script to count number of Ns in a multifasta file !
...l-$n),"\n"; } } close(I); __END__ Note: Convert sequences in oneline first perl -pe '/^>/ ? print "\n" : chomp' scaffolds_backup.fasta > out.fasta perl countN.pl scaff.fa...2147 days ago
Perl subroutine for reading multifasta file !
sub readfasta { (my $file)=@_; my %sequence; my $header; my $temp_seq; #suppose fasta files contains multiple sequences; open (IN, "2147 days ago