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
| BEGIN { | |
| FS="\t"; | |
| } | |
| { | |
| split($10,exonStarts,","); | |
| split($11,exonEnds,","); | |
| geneSize=1.0*int($6)-int($5); | |
| exonCount=int($9); | |
| if(exonCount<2) |
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
| Sequence data input: | |
| A common input file format is bed file. In the simplest form, it has the format | |
| chromosome -tab- startposition -tab- endposition | |
| where each line corresponds to one sequence read | |
| However this format can also include strand information: | |
| chromosome -tab- startposition -tab- endposition -tab- name -tab- score -tab- +/- | |
| for example: | |
| chr13 54005048 54005081 . 1 - | |
| The score field is ignored. | |
| Files are allowed by have an optional first line starting with "track", this line is then ignored |
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
| from itertools import count | |
| def pattern_update(sequence, width=2, store={}): | |
| """ | |
| Accumulates nucleotide patterns of a certain width with | |
| position counts at each index. | |
| """ | |
| # open intervals need a padding at end for proper slicing | |
| size = len(sequence) + 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
| from Bio.SeqIO.QualityIO import FastqGeneralIterator | |
| corrected_fn = "my_input_fasta.fas" | |
| uncorrected_fn = "my_input_fastq.ftq" | |
| output_fn = "differences_fastq.ftq" | |
| corrected_names = set() # Use a set instead of a list | |
| for line in open(corrected_fn): | |
| if line[0] == ">": | |
| read_name = line.split()[0][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
| library("GeneAnswers") | |
| library("org.Dm.eg.db") | |
| library("GO.db") | |
| # get named vector of entrez ids | |
| fb.entrez <- unlist(as.list(org.Dm.egFLYBASE2EG)) | |
| # for a data frame x with flybase ids (column 1) and data values (column 2) | |
| # match the flybase names against the vector of entrez ids | |
| iv <- match(x[,1], names(fb.entrez)) |
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
| #rs10012775 chr4 122896328 0.45819 T C 0.358 | |
| #biocLite("BSgenome.Hsapiens.UCSC.hg18") | |
| library("BSgenome.Hsapiens.UCSC.hg18") | |
| con <- file("SNPS_FILE") | |
| Lines <- readLines(con) | |
| N <- length(Lines) | |
| for (i in 1:N){ |
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
| sink("log",append=FALSE,type=c("output","message"),split=FALSE) | |
| library(GOstats) | |
| library(EMA) | |
| library(fdrtool) | |
| library(org.Pt.eg.db) | |
| Args <- commandArgs(); | |
| UNIV <- Args[6] | |
| #GL <- Args[5] |
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 python | |
| import sys | |
| import Bio | |
| from Bio import SeqIO, SeqFeature | |
| from Bio.SeqRecord import SeqRecord | |
| import os | |
| # Copyright(C) 2009 Iddo Friedberg & Ian MC Fleming | |
| # Released under Biopython license. http://www.biopython.org/DIST/LICENSE | |
| # Do not remove this comment |
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
| # an example script demonstrating the use of BioMart webservice | |
| use strict; | |
| use LWP::UserAgent; | |
| open (FH,$ARGV[0]) || die ("\nUsage: perl getFromEnsembl.pl Query.xml\n\n"); | |
| my $xml; | |
| while (<FH>){ | |
| $xml .= $_; | |
| } |
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
| #-------------------------------------------------------------------------- | |
| # handle the command line arguments | |
| # | |
| if ( $#ARGV == -1) | |
| { | |
| &usage; | |
| exit 0; | |
| } | |
| while (@ARGV) |