Remove duplicate lines with perl
#! perl -sw use strict; my %lines; #open DATA, $ARGV[0] or die "Couldn't open $ARGV[0]: $!\n"; while () { print if not $lines{$_}++; } __DATA__ apple apple plum vinegar apple banana banana banana apple2306 days ago
Remove the duplicated line present only next to each other with Perl
...ext_line$/"; print $_ if $_ ne $next_line; } continue { $_ = $next_line; } print $_ if eof; } __DATA__ apple apple plum vinegar apple banana banana...2306 days ago
Plot the density of genes in R
#column1 = chromosome name and column2 = start position of the gene # check if ggplot2 is installed, if so, load it, # if not, install and load it if("ggplot2"...2297 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() { chomp; n...2264 days ago
Plot custom gene density with R
library(karyoploteR) pp2263 days ago
Perl script to find palindromic regions in DNA sequences
use strict; use warnings; my $pp = qr/(?: (\w) (?1) \g{-1} | \w? )/ix; my $filename = $ARGV[0]; open(my $fh, '2167 days ago
Bash script to convert SAM to BAM visualization ready
samtools view -bS file.sam | samtools sort - file_sorted samtools index test_sorted.bam test_sorted.bai2196 days ago
Perl script to find coding regions in DNA sequences
...etween # the probability computed from the table of codon frequencies divided # by the random probabili...d ratio. # It is recommended the use of logs to manage calculations involving # small numbers between 0...2168 days ago
Mapping with BWA-mem or BWA-sampe in one go with python script !
...dexed BAM files as input. Any read aligner + samtools can be used to obtain such files. Read pairs needs to be aligned in paired read mode. BESST provides a script (https://github.c...2137 days ago
2164 days ago