-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19682f1
commit d96f73d
Showing
6 changed files
with
138 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.