Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GUDMAP_RBK
data_hub_scripts
Commits
db5270b5
Commit
db5270b5
authored
Jan 11, 2021
by
Venkat Malladi
Browse files
Update split study.
parent
ece65739
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/split_study.sh
View file @
db5270b5
...
...
@@ -4,18 +4,71 @@
#SBATCH --job-name GUDMAP-RBK_Study
#SBATCH -t 7-0:0:0
# query GUDMAP/RBK for study RID
echo
"curl --location --request GET 'https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Replicate/Study_RID="
${
1
}
"'"
| bash
>
$1_studyRID
.json
# extract replicate RIDs
module load python/3.6.4-anaconda
python3 ./workflow/scripts/split_study.py
-s
$1
script_name
=
"split_study.sh"
# run pipeline on replicate RIDs in parallel
module load nextflow/20.01.0
module load singularity/3.5.3
while
read
repRID
;
do
echo
${
repRID
}
;
sleep
30
;
done
<
"
$1_studyRID
.csv"
| xargs
-P
5
-I
{}
nextflow
-q
run workflow/rna-seq.nf
--repRID
{}
--source
production
--deriva
/project/BICF/BICF_Core/shared/gudmap/test_data/auth/credential.json
--bdbag
/project/BICF/BICF_Core/shared/gudmap/test_data/auth/cookies.txt
--dev
false
--upload
true
--email
gervaise.henry@utsouthwestern.edu
-with-report
./output/
{}
_report.html
-with-timeline
./output/
{}
_timeline.html
#Help function
usage
()
{
echo
"-h --Help documentation for
$script_name
"
echo
"-r --Study_RID."
echo
"-t --Tag of pipelne"
echo
"Example:
$script_name
-r 16-1ZP0 -t 0.1.0"
exit
1
}
# cleanup study RID files
rm
$1_studyRID
.json
#rm $1_studyRID.csv
main
(){
# Load required modules
module load python/3.6.4-anaconda
module load nextflow/20.01.0
module load singularity/3.5.3
# Parsing options
OPTIND
=
1
# Reset OPTIND
while
getopts
:r:t:h opt
do
case
$opt
in
r
)
rid
=
$OPTARG
;;
t
)
tag
=
$OPTARG
;;
h
)
usage
;;
esac
done
shift
$((
$OPTIND
-
1
))
# Check for mandatory options
if
[[
-z
$rid
]]
||
[[
-z
$tag
]]
;
then
usage
fi
# query GUDMAP/RBK for study RID
echo
"curl --location --request GET 'https://www.gudmap.org/ermrest/catalog/2/entity/RNASeq:Replicate/Study_RID="
${
rid
}
"'"
| bash
>
$rid
\_
studyRID.json
# extract replicate RIDs
python3 ./scripts/split_study.py
-s
$rid
# cleanup study RID files
rm
$rid
\_
studyRID.json
# make dir for study
mkdir
$rid
mv
$rid
\_
studyRID.csv
$rid
cd
$rid
# download version of RNA-seq pipelne
existed_in_remote
=
$(
git ls-remote
--tags
git@git.biohpc.swmed.edu:gudmap_rbk/rna-seq.git
${
tag
}
)
if
[[
-z
${
existed_in_remote
}
]]
;
then
echo
"The tag
${
tag
}
doesn't exist."
exit
1
fi
git clone
-b
$tag
--depth
1 git@git.biohpc.swmed.edu:gudmap_rbk/rna-seq.git
cd
rna-seq
# run pipeline on replicate RIDs in parallel
while
read
repRID
;
do
echo
${
repRID
}
;
sleep
30
;
done
<
"../
${
rid
}
_studyRID.csv"
| xargs
-P
5
-I
{}
nextflow
-q
run workflow/rna-seq.nf
--repRID
{}
--source
production
--deriva
/project/BICF/BICF_Core/shared/gudmap/test_data/auth/credential.json
--bdbag
/project/BICF/BICF_Core/shared/gudmap/test_data/auth/cookies.txt
--dev
false
--upload
true
--email
gervaise.henry@utsouthwestern.edu
-with-report
./output/
{}
_report.html
-with-timeline
./output/
{}
_timeline.html
}
main
"
$@
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment