forked from Sage-Bionetworks/Agora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mongo-import.sh
15 lines (13 loc) · 1.05 KB
/
mongo-import.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cd ../data
# Imports the data and wipes the current collections
# Not using --mode upsert fow now because we don't have unique indexes properly set for the collections
mongoimport --db agora --collection genes --jsonArray --drop --file ./rnaseq_differential_expression.json
mongoimport --db agora --collection geneslinks --jsonArray --drop --file ./network.json
mongoimport --db agora --collection geneinfo --jsonArray --drop --file ./gene_info.json
mongoimport --db agora --collection teaminfo --jsonArray --drop --file ./team_info.json
mongoimport --db agora --collection genesproteomics --jsonArray --drop --file ./proteomics.json
mongoimport --db agora --collection genesmetabolomics --jsonArray --drop --file ./metabolomics.json
mongoimport --db agora --collection genesneuropathcorr --jsonArray --drop --file ./neuropath_corr.json
mongoimport --db agora --collection geneexpvalidation --jsonArray --drop --file ./target_exp_validation_harmonized.json
cd ./team_images
ls -1r *.jpg *.jpeg *.png | while read x; do mongofiles -d agora -v put $x --replace; echo $x; done