Skip to content

Instantly share code, notes, and snippets.

View hiraksarkar's full-sized avatar

Hirak Sarkar hiraksarkar

View GitHub Profile
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__
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:
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,
#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):
@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 anonftp@ftp.ncbi.nlm.nih.gov:{} {}"
def prepare_url(srr_name, prefix):
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hiraksarkar
hiraksarkar / bamfilter_oneliners.md
Created May 30, 2018 14:40 — forked from davfre/bamfilter_oneliners.md
SAM and BAM filtering oneliners
@hiraksarkar
hiraksarkar / spacemacs-cheshe.md
Last active October 1, 2018 16:20 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC f e d - open .spacemacs file
  • SPC f e R - reload .spacemacs file
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
#!/bin/bash
####################################
USAGE: bash auto_sub.sh <QUEUE_LIM> <MAX_JOB_NUM>
###################################
USER="$(whoami)"
MAX_LIMIT=$1
MAX_JOB_NUM=$2