Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoohm committed Feb 5, 2017
1 parent efb80a4 commit 5234b1f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Rscripts/knee_plot.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
library(jsonlite)
args = commandArgs(TRUE)
path = args[1]

# You can tweak here the fraction of reads you expect
# when a cell is captured. I've found that this value often
Expand All @@ -9,7 +10,6 @@ fraction = 0.001
#You can tweak the multiplier of barcodes you need here
# to change the value on the X axis
xlim = 2.5 * fromJSON(paste0(path,'/config.json'))$Barcodes
path = args[1]

samples = names(fromJSON(paste0(path,'/config.json'))$Samples)

Expand Down
15 changes: 10 additions & 5 deletions dropseq.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import subprocess
import sys
import os
import json

try:
sys.argv[1]
Expand All @@ -9,6 +10,7 @@
exit()
wrkdir = sys.argv[1]
configfile = os.path.join(wrkdir, 'config.json')
local_config_file = 'local.json'
FOLDERS = ['summary', 'logs', 'plots']

if (not os.path.isfile(configfile)):
Expand All @@ -18,12 +20,15 @@
joined = os.path.join(wrkdir, folder)
if(not os.path.isdir(joined)):
os.mkdir(joined)


with open(local_config_file) as config_json:
json_data = json.load(config_json)

#Optimized Run for dropseq
first = 'snakemake -s snakefiles/Dropseq_pre_align.snake --cores 6 -pT -d {} --configfile local.json'.format(sys.argv[1])
second = 'snakemake -s snakefiles/Star_align.snake --cores 6 -pT -d {} --configfile local.json'.format(sys.argv[1])
third = 'snakemake -s snakefiles/Dropseq_post_align.snake --cores 6 -pT -d {} --configfile local.json'.format(sys.argv[1])
knee_plot = 'Rscript ../Rscripts/knee_plot.R {}'.format(sys.argv[1])
first = 'snakemake -s snakefiles/Dropseq_pre_align.snake --cores {} -pT -d {} --configfile local.json'.format(json_data['CORES'], sys.argv[1])
second = 'snakemake -s snakefiles/Star_align.snake --cores {} -pT -d {} --configfile local.json'.format(json_data['CORES'], sys.argv[1])
third = 'snakemake -s snakefiles/Dropseq_post_align.snake --cores {} -pT -d {} --configfile local.json'.format(json_data['CORES'], sys.argv[1])
knee_plot = 'Rscript Rscripts/knee_plot.R {}'.format(sys.argv[1])
print('Running pre_processing')
subprocess.call(first, shell=True)
print('Running Alignement')
Expand Down

0 comments on commit 5234b1f

Please sign in to comment.