Skip to content

Instantly share code, notes, and snippets.

View hiraksarkar's full-sized avatar

Hirak Sarkar hiraksarkar

View GitHub Profile
@hiraksarkar
hiraksarkar / ncbi_url.py
Created January 12, 2018 19:56 — forked from apfejes/gist:95405620abb347e1abc87d5708dbc003
A script for NCBI SRA downloads.
import argparse
default_prefix = "ftp.sra.ebi.ac.uk/vol1/fastq/"
ascp_prefix = "ftp.sra.ebi.ac.uk:/vol1/fastq/"
default_protocol = "ftp://"
default_suffix = "*.fastq.gz"
default_ascp_line = "ascp -QT -l 300m -i ~/.ssh/asperaweb_id_dsa.openssh [email protected]:{} {}"
def prepare_url(srr_name, prefix):
#API created by @apfejes (Anthony Fejes) on top of my half-cooked script
#python ebi_url_from_srr.py --file srr_list.txt | xargs -I {} wget {}
import argparse
def prepareURL(srr_name, prefix="ftp://ftp.sra.ebi.ac.uk/vol1/fastq/"):
dir_1=srr_name[:6]
dir_2=""
url=""
num_digits=sum(s.isdigit() for s in srr_name)
if(num_digits == 6):
DROP TABLE IF EXISTS emp;
CREATE TABLE emp (
empno decimal(4,0) NOT NULL,
ename varchar(10) default NULL,
job varchar(9) default NULL,
mgr decimal(4,0) default NULL,
hiredate date default NULL,
sal decimal(7,2) default NULL,
comm decimal(7,2) default NULL,
a = [1,4,5,10]
cache = {}
for i in a:
cache[i] = 1
counter = 0
#okay khub bhalo code hoyeche
def coin(x):
if not x in cache:
Traceback (most recent call last):
File "pymcjointModel.py", line 148, in <module>
estimateBayesFactor(Data_and_Disp)
File "pymcjointModel.py", line 135, in estimateBayesFactor
H_0, H_1, H_2, H_3 = run_pymc(x_u_r1,y_u_r1,x_t_r1,y_t_r1,r_1,r_2)
File "pymcjointModel.py", line 112, in run_pymc
step = Metropolis()
File "/usr/local/lib/python2.7/dist-packages/pymc3/step_methods/arraystep.py", line 60, in __new__
step.__init__([var], *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pymc3/step_methods/metropolis.py", line 98, in __init__