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
| # get subsequence of a fasta file containing only one sequence | |
| fasta_get_subseq () { | |
| awk '/^>/ {printf("\n%s\n",$0);next; } { printf("%s",$0);} END {printf("\n");}' < "$1" | tail -n1 | cut -c$2-$3 | |
| } |
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
| def longblob2list(longblob): | |
| """ | |
| Converts a longblob variable into a list of integers. | |
| "90930917,90931703,90932054," > [90930917,90931703,90932054] | |
| """ | |
| y = [] | |
| for number in longblob.split(','): | |
| if number != "" and number != ",": | |
| y.append(int(number)) | |
| return y |
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
| # gives the coordinates of all 5'UTR exons | |
| awk ' | |
| BEGIN { OFS = "\t"; FS = "\t"} ; | |
| { | |
| # $7 is cdsStart | |
| delete astarts; | |
| delete aends; | |
| split($10, astarts, /,/); | |
| split($11, aends, /,/); | |
| for(i=1; i <= length(astarts); i++){ |
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
| curl -s 'http://rest.ensembl.org/map/human/GRCh37/X:1000000..1000100:1/NCBI36?' -H 'Content-type:application/json' | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["mappings"][0]["mapped"]["end"]' |
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
| sort -k 1,1 -k2,2n |
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
| for X in `fdupes . -r | xargs -n1`; do ls -alhS $X; done |
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/local/bin/python | |
| # File created by Tabea Kischka at Thu May 19 15:24:59 CEST 2016 | |
| # This script orders the sequence in a multi fasta file by the chromosome name in | |
| # karyotypic oder, and not lexicographically. | |
| # I.e., it creates this order: chr1, chr2, chr10, ... | |
| # instead of the order chr1, chr10, chr2 | |
| import sys |
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
| echo -e '\033k'"Super_title_includes_directory_${PWD}"'\033\\' |
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
| find . -type l ! -exec test -e {} \; -print |
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 | |
| """ | |
| Turns tab delimited data to macdown table format. | |
| Needs the csvtoolkit to be installed. | |
| """ | |
| import sys | |
| import os | |
| import tempfile | |
| import argparse |