π¦
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $data = []; | |
my $t_data = []; | |
while(<>){ | |
chomp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $usage = "Usage: $0 <bp> <seed>\n"; | |
my $num = shift or die $usage; | |
my $seed = shift or die $usage; | |
#set seed for reproducibility |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $usage = "Usage: $0 <infile.fa> <number> <length>\n"; | |
my $fasta = shift or die $usage; | |
my $num = shift or die $usage; | |
my $len = shift or die $usage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# | |
# Script that compares two files of IDs, that are on separate lines | |
# See http://stackoverflow.com/questions/2933347/comparing-two-arrays-using-perl | |
# | |
use strict; | |
use warnings; | |
use Array::Utils qw(:all); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Simple script that takes an input fasta sequence | |
# and generates paired end reads | |
use strict; | |
use warnings; | |
my $usage = "Usage: $0 <infile.fa> <read length> <number of pairs> <inner mate distance> <seed>\n"; | |
my $fasta = shift or die $usage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Takes a fasta file as input and randomly mutates bases | |
use strict; | |
use warnings; | |
my $usage = "Usage: $0 <infile.fa> <mutation percent> <seed>\n"; | |
my $infile = shift or die $usage; | |
my $mutation = shift or die $usage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# | |
# Reads a tab-delimited file with column and row names | |
# sums the rows and columns and outputs a tab-delimited | |
# file with an extra row and column for the sums | |
# | |
use strict; | |
use warnings; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Strings (the query) present on each line of a file are matched to Human Phenotype Ontology (HPO) terms (the subject) | |
# If a direct match between the query and subject could not be found, a global alignment is performed | |
# Alignments will only take place between queries and subjects that are not longer than each | |
# other by a length of 5 characters (including spaces) | |
# For example, 'short' and 'microphones' differ by a length of 6 and will not be compared | |
# The terms 'short' and 'computer' will be aligned because they differ by a length of 3 | |
# Change $threshold if you want to change the length difference threshold |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# Script to output names and synonyms of HPO terms | |
use strict; | |
use warnings; | |
my $usage = "Usage: $0 <HPO term> [HPO terms]\n"; | |
if (scalar(@ARGV) == 0){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env Rscript | |
# | |
# Usage: plot_gemini.R <file.tsv> | |
# | |
my_required <- c('ggplot2', 'reshape2', 'ggthemes') | |
for (my_package in my_required){ | |
if(my_package %in% rownames(installed.packages()) == FALSE){ | |
stop(paste("Please install", my_package, "first")) | |
} |