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
| grep -R 'CPU time' results/* | awk '{print $5}' | paste -sd+ - | bc |
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
| #!/bin/bash | |
| source /nas02/apps/Modules/default/init/bash | |
| module clear < yes.file # yes.file contains only the letter 'y' | |
| module add <module> | |
| <module_exe> ... |
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
| #!/bin/sh | |
| accession=$1 | |
| wget -q "ftp://ftp-trace.ncbi.nih.gov/sra/sra-instant/reads/ByRun/sra/${accession:0:3}/${accession:0:6}/$accession/$accession.sra" |
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
| #!/nas02/apps/python-2.7.6/bin/python | |
| import sys | |
| import math | |
| if len(sys.argv) < 2 or sys.argv[1] == "-h" or sys.argv[1] == "--help": | |
| print "fa2fq <fasta> <accuracy>" | |
| acc = float(sys.argv[2]) | |
| phred = int(-10 * math.log(1.0 - acc, 10)) |
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
| Add this to .bashrc: | |
| fq2fa(){ | |
| sed -n '1~4s/^@/>/p;2~4p' $1 | |
| } | |
| OR | |
| Create a file (ex. ~/local/bin/fq2fa) |
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 ssw_wrap import Aligner | |
| tseq = "AAGAGAGAGATTAAACGCTTGCTGCTATCGCCATACGCCGATACTAATCAGCAGACTTGCTCATCCAGCGTGCTGCCCGTAAAAAAAGGCGTCGTCCACTGCTGACGTCAAAGCCGACCATCGGGCCGGTATCCAGTCCCAGCGCCCGGCAGGCGACGAATCCAGATTAAGCGCCTGCATGGACTGTTGCGAAACGCGTCTTCCTTCGGCAAGTTGTGGGCAATGGAGGTAAACCAACTGCGGCATCACCGTGGGGAAACGTAATGCGTAACCCGTTCATAAAATCTCACTGTCCCAGGCGACGATAGCGGTGACGAGGCGCGGTCAGGGGTTTTTTGCAGATTGCCAGCTGGAAAGTAGCCGGGCGCAGAACGTATTCTTATTCCTTCTGCAAGATGCCAGGATAAACACGATATCGCATCAACGCGGCAGAACAGTTAGATGATGAAATCGGCCCCCATTTCATAAGGAGCATAAAAATCTCCGTAACGTCTCATCGCTGACGGGTGTCTCCCGCCAGCAACGTTGTGTGAGTGAGGGCATCGAGTGAAACAGGGGTGACTAAGCGAACCTGGGCTAACCGGCATTCGTATCATCCAGCAATTCCTTAACAGGGCGGCATTCACGGATGATGTTAACAGGCCCTGGAAGAACCCGTTGAGCTAACAGAGCATAAATCGTTTCGGGGACCTCACGCGATCACGTTTGCAGGCGTGTCCCCATAGCTGCCAATGTTATCTGGCTATCGGGCAGGCCGCGCATGAAGTCACTGGAAAATGCTGTTGGCACAGCAGATCATCGACGTGGGCAGACCGTGGATGTGTGCACCGGGCAGCGGTGCGATCGGCGCAATGGTGTGAGCTAAAGATCAGCGCGTTGTTGAGGGCGTTAAGTCGACGCAGTAAATCCCTCTCTTTCTGCCCCCTGAAAATGCGCCAGGTGCAGGCGCGTCTTCTGCCTCACAGGCGAGGTCGCGGGCCGCCATC |
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 sys | |
| import Image | |
| def main(text, pattern): | |
| text = Image.open(text) | |
| text = text.convert('L') # to luminosity | |
| pattern = Image.open(pattern) | |
| width, height = text.size | |
| newim = Image.new('RGB', (width, height), (255,255,255)) | |
| for x in xrange(width): |
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 math | |
| def main(): | |
| factorcache = [factors(a) for a in xrange(10001)] | |
| steps = [0, 0, 0, 0] | |
| limit = 100 | |
| for a in xrange(2, limit+1): | |
| for b in xrange(a, limit+1): | |
| s = a + b | |
| p = a * b |
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
| var fs = require('fs'); | |
| Array.prototype.remove = function(val) { | |
| var index = this.indexOf(val); | |
| if(index > -1) { | |
| return this.splice(index, 1); | |
| } else { | |
| return null; | |
| } | |
| } |
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
| <html><head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
| <script> | |
| $(function() { | |
| var size = 1000; | |
| var colors = [[0.6, '#CCCC00'], | |
| [0.2, '#FFFF00'], | |
| [0.1, '#FFFFFF'], | |
| [0.1, '#888800']]; | |
| var variance = 10; |
NewerOlder