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 | |
| #$ -S /bin/bash | |
| #$ -o /dev/null | |
| #$ -e /dev/null | |
| #$ -cwd | |
| #$ -V | |
| #$ -R y | |
| #$ -pe smp 1 | |
| #$ -l scr=1G | |
| #$ -l tmem=2G,h_vmem=1G |
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 f in `find /goon2/project99/IBDAJE_raw/Macrogen/ -type f -name '*_ANNO.csv' ` | |
| do | |
| ln -s $f csv/ | |
| 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
| import sys | |
| i=int(sys.argv[1]) | |
| d=dict() | |
| for l in sys.stdin.readlines(): | |
| l=l.strip().split(',') | |
| k=l.pop(i) | |
| d[k]=d.get(k,[])+l | |
| for k in d: | |
| print ','.join([k]+d[k]) |
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,gzip | |
| vcf = gzip.open(sys.argv[1],"r") | |
| #these 9 column headers are standard to all VCF files | |
| STD_HEADERS=['CHROM','POS','ID','REF','ALT','QUAL','FILTER','INFO','FORMAT'] | |
| #the samples headers depend on the number of samples in the file | |
| #which we find out once we read the #CHROM line | |
| SAMPLE_HEADERS=[] |
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 chr*.gvcf.gz | |
| do | |
| mkdir -p ${x%%.gvcf.gz} | |
| ln -s `pwd`/$x.tbi `pwd`/${x%%.gvcf.gz}/Levine_test.gvcf.gz.tbi | |
| 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
| seq 1 10 | xargs -I x echo number x |
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 | |
| set -e | |
| set -u | |
| ## | |
| until [ -z "$1" ] | |
| do | |
| # use a case statement to test vars. we always test $1 and shift at the end of the for block. | |
| case $1 in | |
| # parameters to qsub |
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 | |
| f=$1 | |
| extension=${f##*.} | |
| if [[ "$extension" == 'vcf' ]] | |
| then | |
| in=$f | |
| out=${in}.gz | |
| bgzip $in > $out |
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
| #Which shell? | |
| ps | grep $$ | |
| #Which distro? | |
| cat /etc/issue | |
| #Which connections? | |
| lsof -i | |
| netstat -lptu | |
| cat /proc/xxxx/net/tcp |
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
| # prints to stderr in red | |
| function error() { >&2 echo -e "\033[31m$*\033[0m"; } | |
| function stop() { error "$*"; exit 1; } | |
| try() { "$@" || stop "cannot $*"; } |