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
| 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
| 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
| # 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
| 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
| # 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
| awk '/^>/ {printf("\n%s\n",$0);next; } { printf("%s",$0);} END {printf("\n");}' | awk 'BEGIN {RS = ">" ; FS = "\n"} NR > 1 {print "@"$1"\n"$2"\n+"$1"\n"gensub(/./, "I", "g", $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
| #!/usr/bin/env bash | |
| # Prints the number of identical rows between different columns for two | |
| # csv files. The first argument is the column number which should be used. | |
| # For example, you can compare the IDs given in a csv file. | |
| cut -f $1 $2 | sort > .file1 | |
| cut -f $1 $3 | sort > .file2 | |
| # With no options, comm produces three-column output. |
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 | |
| """ | |
| Created by Tabea Kischka at 2015-01-27 10:34:05 | |
| converts a last maf alignment into a fasta alignment | |
| """ | |
| import sys | |
| path_to_alignio = '/home/tabeah/Scripts/alignio-maf' |
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 | |
| """ | |
| Creates a pdf alignment | |
| """ | |
| import sys | |
| import os | |
| import tempfile | |
| input_filename = sys.argv[1] |