Skip to content
Snippets Groups Projects
Commit 105fc708 authored by Gautier Koscielny's avatar Gautier Koscielny
Browse files

LSF dependencies removed. Correction of sql statement to get the list of cores.

parent 2a4087a9
No related branches found
No related tags found
No related merge requests found
......@@ -89,9 +89,9 @@ then
## Find a core database for this species on the specified server.
if [[ -n "$password" && $password != "" ]]
then
core=`mysql -h ${host} -P ${port} -u ${user} -p ${password} -s --skip-column-names -e "show databases like '${species}_core_%'"`
db=`mysql -h${host} -P${port} -u${user} -p${password} -s --skip-column-names -e "show databases like '${species}\_core\_%'"`
else
core=`mysql -h${host} -P${port} -u${user} -s --skip-column-names -e "show databases like '${species}_core_%'"`
db=`mysql -h${host} -P${port} -u${user} -s --skip-column-names -e "show databases like '${species}\_core\_%'"`
fi
else
echo "Species or/and database name are required." ;
......@@ -99,7 +99,7 @@ then
exit 1;
fi
else
core=${db};
echo "Using ${db} as core database.";
fi
else
echo "Hostname and username are required."
......@@ -111,7 +111,7 @@ fi
y=0;
for X in ${core}
for X in ${db}
do
y=$[$y+1];
done
......@@ -126,31 +126,37 @@ fi
if [[ ${y} -gt 1 ]]
then
echo "Check your parameters, there are ${y} databases matching species '${species}':";
echo "$core";
echo "${db}";
exit 1;
fi
echo "Using ${db} as core database.";
# Otherwise, start the pipeline
NOW=$(date +"%Y-%m-%d-%H-%M-%S")
echo "Starting pipeline with timestamp '${NOW}'";
echo "Fetch the gene models from ${db}..."
if [ -n "$password" ]
then
bsub -q normal -o ${output_dir}/as_gff_${species}_${NOW}.out -e ${output_dir}/as_gff_${species}_${NOW}.err -J as_gff_${species}_${NOW} "perl Fetch_gff.pl -dbname ${db} -dbhost ${host} -dbport ${port} -dbuser ${user} -dbpass ${password} -o ${output_dir}/${species}_${NOW}_variants.gff"
perl Fetch_gff.pl -dbname ${db} -dbhost ${host} -dbport ${port} -dbuser ${user} -dbpass ${password} -o ${output_dir}/${species}_${NOW}_variants.gff
else
bsub -q normal -o ${output_dir}/as_gff_${species}_${NOW}.out -e ${output_dir}/as_gff_${species}_${NOW}.err -J as_gff_${species}_${NOW} "perl Fetch_gff.pl -dbname ${db} -dbhost ${host} -dbport ${port} -dbuser ${user} -o ${output_dir}/${species}_${NOW}_variants.gff"
perl Fetch_gff.pl -dbname ${db} -dbhost ${host} -dbport ${port} -dbuser ${user} -o ${output_dir}/${species}_${NOW}_variants.gff
fi
bsub -q small -o ${output_dir}/as_compute_${species}_${NOW}.out -e ${output_dir}/as_compute_${species}_${NOW}.err -w "done(\"as_gff_${species}_${NOW}\")" -J as_compute_${species}_${NOW} "altSpliceFinder -i ${output_dir}/${species}_${NOW}_variants.gff -o ${output_dir}/${species}_${NOW}_events.gff --relax --statistics"
echo "Compute the Alternative Splicing events";
altSpliceFinder -i ${output_dir}/${species}_${NOW}_variants.gff -o ${output_dir}/${species}_${NOW}_events.gff --relax --statistics
echo "Populate ${db} with alternative splicing information";
if [ -n "$password" ]
then
bsub -q normal -o ${output_dir}/as_populate_${species}_${NOW}.out -e ${output_dir}/as_populate_${species}_${NOW}.err -w "done(\"as_compute_${species}_${NOW}\")" -J as_populate_${species}_${NOW} "perl load_alt_splice_gff.pl -file ${output_dir}/${species}_${NOW}_events.gff -host ${host} -user ${user} -pass ${password} -dbname ${core}"
perl load_alt_splice_gff.pl -file ${output_dir}/${species}_${NOW}_events.gff -host ${host} -user ${user} -pass ${password} -dbname ${db}
else
echo "Sorry, you did not provide any password. The script can't populate the database with the Alternative splicing information.";
echo "However, the results are available in ${output_dir}/${species}_${NOW}_events.gff";
fi
echo "All done."
exit 0;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment