Perl script to split fasta sequence and create overlaps
#!/usr/bin/perl use strict; use warnings; my $len = 5000; my $over = 200; my $seq_id=$ARGV[0]; my $seqFile = $ARGV[1]; my $seq; open(my $fh, "1971 days ago
Perl script to count occurrence of a character !
#!/usr/bin/env perl # -*- coding: utf-8 -*- #!/usr/bin/perl use strict; use warnings; my %count_of; while ( ) { my @val = split "\t", $_; #my (...1899 days ago
Perl script to run in parellel !
#!/usr/bin/perl use strict; use warnings; use Parallel::ForkManager; use Bio::SeqIO; my ($sequence_data_ref) = parse_genome_files($ARGV[0]); my %genome=%{$seq...1685 days ago
Find and replace in multifasta or fasta header with perl onliner
You have a fasta file and you want to replace: "|" You are told to replace that by "_" perl -i -p -e "s/\|/_/g" genome.fasta -i = inplace editing -p = loop over lines and print each line (after processing) -e = command line script1614 days ago
Perl script to remove duplicated lines !
#!/usr/bin/perl use strict; use warnings; { $_ = ; my $next_line; while( $next_line = ) { #print "current line: $_ -- next line: $next_line$/";...1559 days ago
Bash script to download SRA file !
#We can use the sratoolkit to directly pull the sequence data (in paired FASTQ format) from the archive. fastq-dump is in the SRA toolkit. It allows directly downloadin...1558 days ago
Bash script to alignment of short reads against reference genome !
bwa mem -t 40 -R '@RG\tID:K12\tSM:K12' \ E.coli_K12_MG1655.fa SRR1770413_1.fastq.gz SRR1770413_2.fastq.gz \ | samtools view -b - >SRR1770413.raw.bam sambamba...1558 days ago
1558 days ago
1550 days ago
Perl script to delete the adjacent repeats !
/usr/bin/perl #Mostly the interview question for bioinfomatician ! #Write a code to delete the adjacent repeated character .... $string='ATTTTTTGGC'; # This sho...1549 days ago