Skip to content

Commit

Permalink
tag >> 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ShixiangWang committed Jul 1, 2018
1 parent 19682f1 commit d96f73d
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ iedb=~/Variants2Neoantigen/data/iedb/iedb.fasta # iedb database u
##PATH_HLA=~/wangshx/projects/data/ # directory path to patient specific HLA alleles file
####### <<<<<< Location of Softwares, python environment and input arguments
py_env=pipeline # python environment, which can run pvacseq
py_env=pipeline # python environment, which can run pvacseq (Python 3.5)
py2_env=py2 # python2.7
maf2vcf=~/vcf2maf/maf2vcf.pl # path of maf2vcf.pl script
Expand Down
12 changes: 9 additions & 3 deletions add_path.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
#!/bin/bash
# add runNEO path to ~/.bashrc
# add Variants2neoantigen path to ~/.bashrc

echo "Add permission for scripts..."
chmod u+x *.sh runNEO

echo "Add path for Variants2neoantigen tool..."
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "# add path for runNEO tool" >> ~/.bashrc
echo "# add path for Variants2neoantigen tool" >> ~/.bashrc
echo 'export' PATH=\""$DIR:\$PATH"\" >> ~/.bashrc
source ~/.bashrc

echo "Add runNEO path to your ~/.bashrc successfully!"
echo "Add Variants2neoantigen path to your ~/.bashrc successfully!"
echo "==> Please open a new terminal or run source ~/.bashrc handly before using it."


exit

9 changes: 3 additions & 6 deletions configureArgs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# This file is used to configure default parameters of neoantigens computation
# If you do not know what it means, DO NOT change it!!!
# If you want help, free to send email to <[email protected]>
# Please change the content following the provided format
# If you want help, free to send email to <[email protected]> or open an issue at <https://github.com/ShixiangWang/Variants2Neoantigen/issues>

####### <<<<<< Location of Files
##maffiles=$(pwd)/*.maf # location of maf file
##OUTPUT=$(pwd)/neoantigen_results
CACHE_VEP=~/.vep/ # directory path of ensembl vep cache
PATH_FASTA=~/.vep/homo_sapiens/92_GRCh37/Homo_sapiens.GRCh37.75.dna.primary_assembly.fa
# path of reference fasta file
iedb=~/Variants2Neoantigen/data/iedb/iedb.fasta # iedb database used for blastp
##PATH_HLA=~/wangshx/projects/data/ # directory path to patient specific HLA alleles file
iedb=~/Variants2Neoantigen/data/iedb/iedb.fasta # iedb database used for blastp

####### <<<<<< Location of Softwares, python environment and input arguments
py_env=pipeline # python environment, which can run pvacseq
Expand Down
87 changes: 87 additions & 0 deletions runNEO_prepare
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#! /usr/bin/env bash
# Generate configure file before computation.
# input file and HLA must provide

####################################
### Parsing option using getopts ###
####################################

# i or --input: input maf (or vcf -> enhancement)path
# o or --output: output directory path
# --HLA: HLA file path
# --mode: maf or vcf ? -> enhancement
# --seq: workflow? -> enhancement
optspec=":hi:o:-:"
while getopts "$optspec" optchar; do
case "${optchar}" in
-)
case "${OPTARG}" in
loglevel)
val="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
echo "Parsing option: '--${OPTARG}', value: '${val}'" >&2;
;;
#loglevel=*)
# val=${OPTARG#*=}
# opt=${OPTARG%=$val}
# echo "Parsing option: '--${opt}', value: '${val}'" >&2
# ;;
HLA)
val="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 ))
echo "The HLA path is $val";
PATH_HLA=$val
;;
*)
if [ "$OPTERR" = 1 ] && [ "${optspec:0:1}" != ":" ]; then
echo "Unknown option --${OPTARG}" >&2
fi
;;
esac;;
h)
echo "usage: $0 [-i <input_file>] [-o <output_dir>] [--HLA <HLA_file>]" >&2
exit 2
;;
i)
echo "The input file path is $OPTARG"
maffiles=$OPTARG
;;
o)
echo "The output directory path is $OPTARG"
OUTPUT=$OPTARG
;;
*)
if [ "$OPTERR" != 1 ] || [ "${optspec:0:1}" = ":" ]; then
echo "Non-option argument: '-${OPTARG}'" >&2
exit 2
fi
;;
esac
done

# if variable name is not set, show help info
if [ ! -n "$maffiles" ]; then
runNEO_prepare -h
exit
fi

if [ ! -n "$OUTPUT" ]; then
OUTPUT=`pwd`
fi

if [ ! -n "$PATH_HLA" ]; then
runNEO_prepare -h
exit
fi

# generate a args file
echo "Configuration file generating..."
ShellDIR=$(cd `dirname $0`; pwd)

source $ShellDIR/configureArgs
cat $ShellDIR/configureArgs | grep -v "^##" | grep -v "ShellDIR" > $(pwd)/inputArgs.txt
echo "maffiles=$maffiles" >> $(pwd)/inputArgs.txt
echo "OUTPUT=$OUTPUT" >> $(pwd)/inputArgs.txt
echo "PATH_HLA=$PATH_HLA" >> $(pwd)/inputArgs.txt
echo "ShellDIR=$ShellDIR" >> $(pwd)/inputArgs.txt

echo "Configure file inputArgs.txt has been successfully generated in current directory."
echo "Please modify nessary arguments and run runNEO_run to start the pipeline."
38 changes: 38 additions & 0 deletions runNEO_run
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#! /usr/bin/env bash
# Run neoantigen computation, which will use configure file in current directory.


# load arguments from configure file
source $(pwd)/inputArgs.txt

source activate $py_env
# check if software commands exist
type blastp >/dev/null 2>&1 || { echo >&2 "blastp is need but it's not installed in $py_env environment . Aborting."; exit 1; }
type pvacseq >/dev/null 2>&1 || { echo >&2 "pvacseq is need but it's not installed in $py_env environment. Aborting."; exit 1; }
type samtools >/dev/null 2>&1 || { echo >&2 "samtools is need but it's not installed in $py_env environment. Aborting."; exit 1; }

echo ----------------------
echo --- Pipeline Begin ---
echo ----------------------

#step1: transform maf files to vcf files
$ShellDIR/step1-transformMaf2VCF.sh

# step2: run neoantigen computation, choose only one way as follows to run, other line should be commented

# serial way
#$ShellDIR/step2-NEOcomputation_serial.sh

# parallel way
$ShellDIR/step2-NEOcomputation_parallel.sh

# step3: summary neoantigen results
# $ShellDIR/step3-summaryNeoantigens.sh

# step3: calculate neoantigen quality
$ShellDIR/step3-neoantigenQcomputation.sh

echo --------------------
echo --- Pipeline End ---
echo --------------------

Empty file modified step3-summaryNeoantigens.sh
100644 → 100755
Empty file.

0 comments on commit d96f73d

Please sign in to comment.