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
import ete2 | |
def tree_to_phyloxml (ete_tree): | |
""" | |
Convert an Ete2 tree to PhyloXML. | |
:Parameters: | |
ete_tree | |
An Ete2 format tree |
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
"""Object-oriented approach to handle very large (i.e., genomic) multi-sequence fasta files. | |
LFastaSeq is the central class of this module providing nucleotide-based access to individual sequence entries as if those entries were separate objects in memory. | |
Example for use in a command line pipe: varlist_generator | gedit <seq_file> > out_file | |
This writes a new sequence to <out_file> with nucleotide changes incorporated as specified by the list of variations <varlist>.""" | |
import sys | |
import IOhelper | |
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
### IMPORTS | |
require 'roo' | |
require 'pp' | |
### IMPLEMENTATION ### | |
# A Excel spreadsheet reader that can clean up column names and convert data. | |
# | |
# Assumptions: The data is read off the first sheet of the workbook. The sheet |
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
# author : Radhouane Aniba | |
#!/usr/bin/perl -w | |
@files = <FOLDER_FOR_BigWigs/*.bigWig>; | |
# For this example we have 4 bigwig files | |
open(BEDFILE, "FILENAME"); | |
while(<BEDFILE>) |
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
checkseqs [options] INFILE [INFILE, INFILE ...] | |
where options are: | |
--repair-with-conc: patch ambiguous characters with the consensus sequence and save | |
--overwrite: newly created files can write over pre-existing ones | |
Consensus is calculated on a 50% threshold. | |
#!/usr/bin/env ruby |
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
# CREATE a TABLE TO USE FOR testing fulltext INDEX AND full-text search | |
DROP TABLE IF EXISTS test; | |
CREATE TABLE test ( | |
id int UNSIGNED PRIMARY KEY AUTO_INCREMENT, | |
title char(100) NOT NULL, | |
article text NOT NULL, | |
fulltext (article) # CREATE the fulltext INDEX ON FIELD article | |
)engine=myisam; # Fulltext INDEX only works WITH MyISAM TABLES, which IS usually DEFAULT | |
# A way TO CREATE a fulltext INDEX ON an already existing TABLE |
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/perl | |
# This script takes something like this as input: | |
# ID WorkId Date | |
# 1 2 12-10-2009 | |
# 2 16 01-01-2008</pre> | |
# And prints out this: | |
#+-----+----------+---------------+ | |
#|ID |WorkId |Date | |
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
use Bio::EnsEMBL::Registry; | |
use Bio::SeqIO; | |
use Bio::Seq; | |
my $sp = "mouse"; | |
my $ensembl = "Bio::EnsEMBL::Registry"; | |
$ensembl->load_registry_from_db( | |
-host => 'ensembldb.ensembl.org', | |
-user => 'anonymous', | |
-verbose => '1' |
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/perl -w | |
my $numb = 1; | |
open(RefGenes, "< ../RefGenes.bed"); | |
while(<RefGenes>) | |
{ | |
print("$numb\r"); |
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
cmd_args <- commandArgs(TRUE) | |
chr <- cmd_args[1] | |
cbeg <- cmd_args[2] | |
cend <- cmd_args[3] | |
tmp <- read.table("tmp",header=F) | |
nbases <- length(which(tmp$V1 != 0)) | |
vec <- tmp$V1 | |
i <- 1 |