added shell script to format muts for mcsm NA
This commit is contained in:
parent
a6f1f65acf
commit
84970a667c
5 changed files with 54 additions and 31 deletions
|
@ -26,7 +26,7 @@ outdir = datadir + '/' + drug + '/output'
|
|||
my_chain = 'A'
|
||||
my_email = 'tanushree.tunstall@lshtm.ac.uk'
|
||||
|
||||
my_pdb_file = homedir + '/git/Data/streptomycin/input/gid_complex.pdb'
|
||||
my_pdb_file = indir + '/gid_complex.pdb'
|
||||
|
||||
# batch 1: 00.txt
|
||||
#my_mutation_list =outdir + '/snp_batches/50/snp_batch_00.txt'
|
||||
|
|
|
@ -20,10 +20,10 @@ my_prediction_url = f"{my_host}/mcsm_na/run_prediction_list"
|
|||
print(my_prediction_url)
|
||||
|
||||
my_outdir = homedir + '/git/LSHTM_analysis/mcsm_na'
|
||||
|
||||
my_nuc_type = 'RNA'
|
||||
my_pdb_file = homedir + '/git/Data/streptomycin/input/gid_complex.pdb'
|
||||
my_mutation_list = homedir + '/git/LSHTM_analysis/mcsm_na/test_snps_b1.csv'
|
||||
my_suffix = 'gid_test_b1'
|
||||
my_suffix = 'TEST'
|
||||
|
||||
#----------------------------------------------
|
||||
# example 1: 2 snps in a file
|
||||
|
@ -31,7 +31,7 @@ my_suffix = 'gid_test_b1'
|
|||
submit_mcsm_na(host_url = my_host
|
||||
, pdb_file = my_pdb_file
|
||||
, mutation_list = my_mutation_list
|
||||
, nuc_type = 'RNA'
|
||||
, nuc_type = my_nuc_type
|
||||
, prediction_url = my_prediction_url
|
||||
, output_dir = my_outdir
|
||||
, outfile_suffix = my_suffix)
|
||||
|
@ -53,4 +53,4 @@ my_suffix = 'single'
|
|||
get_results(url_file = my_url_file_single
|
||||
, host_url = my_host
|
||||
, output_dir = my_outdir
|
||||
, outfile_suffix = my_suffix)
|
||||
, outfile_suffix = my_suffix)
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
http://biosig.unimelb.edu.au/mcsm_na/results_prediction/1613147445.16
|
|
@ -5,36 +5,41 @@ Created on Fri Feb 12 12:15:26 2021
|
|||
|
||||
@author: tanu
|
||||
"""
|
||||
#%% load packages
|
||||
import os
|
||||
homedir = os.path.expanduser('~')
|
||||
os.chdir (homedir + '/git/LSHTM_analysis/mcsm_na')
|
||||
from submit import *
|
||||
|
||||
#%%#####################################################################
|
||||
#EXAMPLE RUN for different stages
|
||||
#=====================
|
||||
# STAGE: submit.py
|
||||
#=====================
|
||||
os.chdir (homedir + '/git/LSHTM_analysis/dynamut')
|
||||
from submit_mcsm_na import *
|
||||
########################################################################
|
||||
# variables
|
||||
my_host = 'http://biosig.unimelb.edu.au'
|
||||
my_prediction_url = f"{host}/mcsm_na/run_prediction"
|
||||
my_prediction_url = f"{my_host}/mcsm_na/run_prediction_list"
|
||||
print(my_prediction_url)
|
||||
|
||||
my_outdir = homedir + '/git/LSHTM_analysis/mcsm_na'
|
||||
# TODO: add cmd line args
|
||||
#gene = 'gid'
|
||||
drug = 'streptomycin'
|
||||
datadir = homedir + '/git/Data'
|
||||
indir = datadir + '/' + drug + '/input'
|
||||
outdir = datadir + '/' + drug + '/output'
|
||||
|
||||
my_pdb_file = homedir + '/git/Data/streptomycin/input/gid_complex.pdb'
|
||||
my_mutation_list = homedir + '/git/LSHTM_analysis/mcsm_na/input_snp_test_b1.csv'
|
||||
my_suffix = 'gid_test1'
|
||||
my_nuc_type = 'RNA'
|
||||
my_pdb_file = indir + '/gid_complex.pdb'
|
||||
|
||||
#----------------------------------------------
|
||||
# example 1: 2 snps in a file
|
||||
#----------------------------------------------
|
||||
# batch 1: 00.txt
|
||||
my_mutation_list = outdir + '/snp_batches/20/snp_batch_00.txt'
|
||||
my_suffix = 'gid_b1'
|
||||
#RAN: 11 Feb, ~17:37
|
||||
|
||||
#==========================
|
||||
# CALL: submit_mcsm_na()
|
||||
# Data: gid+streptomycin
|
||||
#==========================
|
||||
submit_mcsm_na(host_url = my_host
|
||||
, pdb_file = my_pdb_file
|
||||
, mutation_list = my_mutation_list
|
||||
, chain = my_chain
|
||||
, email_address = my_email
|
||||
, prediction_url = my_prediction_url
|
||||
, output_dir = my_outdir
|
||||
, outfile_suffix = my_suffix)
|
||||
#%%###################################################################
|
||||
|
||||
, pdb_file = my_pdb_file
|
||||
, mutation_list = my_mutation_list
|
||||
, nuc_type = my_nuc_type
|
||||
, prediction_url = my_prediction_url
|
||||
, output_dir = outdir
|
||||
, outfile_suffix = my_suffix)
|
||||
#%%#####################################################################
|
19
mcsm_na/split_format_csv.sh
Executable file
19
mcsm_na/split_format_csv.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# FIXME: This is written for expediency to kickstart running dynamut and mcsm-NA
|
||||
|
||||
# Usage: ~/git/LSHTM_analysis/dynamut/split_csv.sh <input file> <output dir> <chunk size in lines>
|
||||
# copy your snp file to split into the mcsm_na dir
|
||||
|
||||
INFILE=$1
|
||||
OUTDIR=$2
|
||||
CHUNK=$3
|
||||
|
||||
mkdir -p ${OUTDIR}/${CHUNK}
|
||||
cd ${OUTDIR}/${CHUNK}
|
||||
|
||||
split ../../${INFILE} -l ${CHUNK} -d snp_batch_
|
||||
for i in *; do mv $i $i.txt; done
|
||||
sed -i 's/^/A /g' *.txt
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue