Extract the values between to user defined string with Perl
#!/usr/bin/perl -w use strict; while () { process_record() if /^\s*START/; } sub process_record { my $line; while (de...t "$line" } print "\n"; #a printout spacer for next record } __DATA__ XXXX YYYY...2290 days ago
Perl script to run SATSUMA in loop !
#!/usr/bin/perl -w use strict; use File::Temp qw(tempfile); # Usage perl 1by1.pl for SATSUMA analysis # User need to set the reference multifasta file name here...2137 days ago
Install Parrot Virtual Machine !
...enGL bindings......................skipped. gen::makefiles - Generate makefiles and other build files...........done. gen::config_pm - Record configuration data for later...1534 days ago
Perl script to extract sequence by Ids from multifasta file !
...= "$ARGV[1]"; my %ids = (); open FILE, $idsfile; while() { chomp; $ids{$_} += 1; } close FILE; local $/ = "\n>"; # read by FASTA record open FASTA, $seqfile; whi...2093 days ago
Perl script to run awk inside perl
...-z_0-9]+=)(.*)/ && shift; # process any FOO=bar switches $, = ' '; # set output field separator $\ = "\n"; # set output record separator while () { chomp; # strip record separator @Fld = split(' ',...1160 days ago
892 days ago
Python script for six frame translation of sequences !
...se_complement[abs(frame)-1:].translate() return translated_seq def six_frame_translation(fasta_file): records = list(SeqIO.parse(fasta_file, "fasta")) for record in records: print(f"...91 days ago
Python script for basic stats of the assembled genome !
...ics total_length = 0 num_contigs = 0 contig_lengths = [] # Iterate through each sequence in the assembly for record in SeqIO.parse(input_file, 'fasta'): length = len(record.seq) total_length += len...91 days ago