Mercurial > repos > nikos > rna_probing
diff summarize_unique_barcodes.sh @ 19:ceb96c265bd1 draft
Trying to set environment r lib path dependencies.
author | nikos |
---|---|
date | Wed, 11 Feb 2015 08:05:10 -0500 |
parents | 31f25b37187b |
children | f64937805d0d |
line wrap: on
line diff
--- a/summarize_unique_barcodes.sh Wed Feb 11 07:32:32 2015 -0500 +++ b/summarize_unique_barcodes.sh Wed Feb 11 08:05:10 2015 -0500 @@ -25,9 +25,10 @@ -t: Trim untemplated nucleotides. -k: Produce k2n file. Warning: Can be sloooow! -r: Rscript path +-l: R lib path -o: Output folder (default: "output_dir") ------------------------------------- -Usage : summarize_unique_barcodes.sh -f <BAM_file> -b <BARCODES> -p <PRIMING_POSITION> -t -k -r <R_SCRIPT_PATH> +Usage : summarize_unique_barcodes.sh -f <BAM_file> -b <BARCODES> -p <PRIMING_POSITION> -t -k -r <R_SCRIPT_PATH> -l <R_LIB_PATH> End-of-message exit } @@ -37,7 +38,7 @@ trim_flag="False" #parse input -while getopts hf:b::p:o:ktr: myarg +while getopts hf:b::p:o:ktr:l: myarg do case "$myarg" in h) print_help exit ;; @@ -48,6 +49,7 @@ p) priming_pos="$OPTARG" ;; o) output_dir="$OPTARG" ;; r) R_SCRIPT_PATH="$OPTARG" ;; #required + l) R_LIB_PATH="$OPTARG" ;; #required [?]) echo "ERROR: Unknown parameter" print_help exit 1 ;; @@ -220,7 +222,7 @@ #Produce k2n file if [ "$k2n" == "True" ]; then - Rscript $R_SCRIPT_PATH/k2n.R merged_temp.gz $output_dir/unique_barcodes.txt $output_dir/k2n.txt + Rscript $R_SCRIPT_PATH/k2n.R $R_LIB_PATH merged_temp.gz $output_dir/unique_barcodes.txt $output_dir/k2n.txt fi #Remove temp files