Skip to content

Instantly share code, notes, and snippets.

View kkapuria3's full-sized avatar
📝
editing Readme.md

Karan Kapuria kkapuria3

📝
editing Readme.md
View GitHub Profile
@kkapuria3
kkapuria3 / keybase.md
Created July 22, 2022 19:37
Keybase Identity

Keybase proof

I hereby claim:

  • I am kkapuria3 on github.
  • I am kkapuria3 (https://keybase.io/kkapuria3) on keybase.
  • I have a public key ASAAJ6Uwp8k3H65ktNpjm9HA07IFuQMQVhXiK0V5ll3Z-Ao

To claim this, I am signing this object:

@kkapuria3
kkapuria3 / bwa2bam.sh
Created June 29, 2018 15:01
Run BWA mem to output BAM files
bwa mem -t 8 genome.fa reads.fastq | samtools sort -@ 8 -o output.bam
@kkapuria3
kkapuria3 / get_cpu_count.sh
Created June 15, 2018 20:18
Get CPU <cores> count of any linux machine.
cpu=$(grep -c ^processor /proc/cpuinfo)
@kkapuria3
kkapuria3 / aws2cgywin.sh
Created June 14, 2018 13:53
Run AWS CLI on cygwin
## If you run pip install awscli from cygwin, it may install awscli in Window's Anaconda Python installation, instead of in Cygwin's Python (which is what you want). Then, when you run aws configure, you will get an error that the aws executable can't be found. The solution is to try the following from a cygwin shell:
pip uninstall awscli
wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
apt-cyg install python
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install awscli
@kkapuria3
kkapuria3 / paramiko_example.py
Created June 1, 2018 13:14 — forked from batok/paramiko_example.py
Paramiko example using private key
import paramiko
k = paramiko.RSAKey.from_private_key_file("/Users/whatever/Downloads/mykey.pem")
c = paramiko.SSHClient()
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
print "connecting"
c.connect( hostname = "www.acme.com", username = "ubuntu", pkey = k )
print "connected"
commands = [ "/home/ubuntu/firstscript.sh", "/home/ubuntu/secondscript.sh" ]
for command in commands:
print "Executing {}".format( command )
@kkapuria3
kkapuria3 / hg19-chromosomes.bed
Last active May 24, 2018 19:01
hg19 chromosome Start-Stop BED File
1 1 249250621
2 1 243199373
3 1 198022430
4 1 191154276
5 1 180915260
6 1 171115067
7 1 159138663
@kkapuria3
kkapuria3 / README.md
Created May 17, 2018 13:58 — forked from jdblischak/README.md
rnaseq-de-tutorial

Differential expression analysis with edgeR

This is a tutorial I have presented for the class Genomics and Systems Biology at the University of Chicago. In this course the students learn about study design, normalization, and statistical testing for genomic studies. This is meant to introduce them to how these ideas are implemented in practice. The specific example is a differential expression analysis with edgeR starting with a table of counts and ending with a list of differentially expressed genes.

Past versions:

@kkapuria3
kkapuria3 / Spot_Price_Now.sh
Created May 16, 2018 17:23
Check Current Spot Instance Price
$ aws --region=us-east-1e ec2 describe-spot-price-history --instance-types c4.4xlarge --start-time=$(date +%s) --product-descriptions="Linux/UNIX" --query 'SpotPriceHistory[*].{az:AvailabilityZone, price:SpotPrice}'
## Result
[
{
"price": "0.024900",
"az": "us-east-1e"
}
]