Skip to content

Instantly share code, notes, and snippets.

View leosanbu's full-sized avatar

Leonor Sánchez-Busó leosanbu

  • FISABIO-Public Health
  • Valencia, Spain
  • X @leosanbu
View GitHub Profile
@leosanbu
leosanbu / xmfa2fas.pl
Created May 13, 2019 09:23
Convert Mauve XMFA to FASTA file by default or using a reference to reorder.
#!usr/bin/perl
#use strict;
my $path = $ARGV[0]; ## Argument: /path/to/file.xmfa ## MAUVE FORMAT ##
my $ref = $ARGV[1]; ## Number of order of the sequence used as reference ##
my @path = split /\//, $path;
my $file = pop @path;
$path = join "\/", @path;
print "\nxmfa2fas\.pl\tversion 1.0\tLSB Oct2013\n\n";
@leosanbu
leosanbu / lsb_functions.R
Created October 12, 2017 10:44
Useful R functions for bioinformatics
## R functions ##
# Get GFF file #
get_GFF <- function(x){
gff.tmp <- system(paste("less", x, "| grep \\\t"), intern=TRUE)
gff.tmp <- strsplit(gff.tmp, "\t")
gff.tmp <- do.call(rbind, gff.tmp)
}