Skip to content

Instantly share code, notes, and snippets.

@mscook
Created November 30, 2012 06:39
Show Gist options
  • Save mscook/4174156 to your computer and use it in GitHub Desktop.
Save mscook/4174156 to your computer and use it in GitHub Desktop.
diff --git a/bin/bg7 b/bin/bg7
old mode 100644
new mode 100755
index f5173ba..1b84cab
--- a/bin/bg7
+++ b/bin/bg7
@@ -29,7 +29,8 @@ runs bg7 version 0.9. Params are:
-G | --genbank_data: xml with extra data for your project needed for .gbk output (things like
locus name, Gen bank division tag, etc). There's a template for this at
${BG7_HOME}/resources/
-
+ -t | --threads: how many cores/threads to run the BLAST searches with. Defaults to 1
+
-h | --help: this message
" >&2
@@ -46,6 +47,7 @@ rnas=""
genetic_code=""
output_folder=""
genbank_data=""
+cores=1
# ## parse input ##
# Now, we will parse params, override corresponding param var after test, and make some fairly basic sanity checks.
@@ -136,6 +138,13 @@ while [ "$1" != "" ]; do
fi
output_folder=$(readlink -f "$1")
;;
+ -t | --threads ) shift
+ if [ "$1" = "" ]
+ then
+ echo "Will only use a single core"
+ fi
+ cores="$1"
+ ;;
-h | --help ) usage
exit 1
;;
@@ -214,9 +223,9 @@ echo "--output_folder ${output_folder}" >> $params_log_file
# ## BLAST runs ##
# here we run blast for RNAs and proteins.
# get number of processors; you need to set this manually for BLAST
-cores=$(grep -c processor /proc/cpuinfo)
-echo "it looks like this machine has ${cores} cores, will use that for blast settings"
-echo "cores used for BLAST: ${cores}" >> $params_log_file
+#cores=$(grep -c processor /proc/cpuinfo)
+#echo "it looks like this machine has ${cores} cores, will use that for blast settings"
+#echo "cores used for BLAST: ${cores}" >> $params_log_file
# ### RNAs vs contigs run ###
#
# first, we run RNAs vs contigs
@@ -394,7 +403,7 @@ EOF
echo "you can take a look at it, if you want: $output_folder/executions.xml"
# ugly hack, executions.xml should be a param
-cp $BG7_HOME/jar/bg7.jar $output_folder/
+cp $BG7_HOME/jars/BG7.jar $output_folder/bg7.jar
# run bg7!
# I will add memory conf through the script later on, no time for this now
echo "running bg7 now!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment