mongoexport -d mofangdb -c log_user_access_index --type=csv -f _id,uid,page,date -o log_user_access_index.csv mongoexport -d comb -c vcf_file_base_info -q '{"version":"v2"}' --type=csv -f batch -o v2batch.csv --host X.X.X.X --port 27017 mongoexport -d comb -c vcf_file_base_info -q '{"version":"v2.1"}' --type=csv -f batch -o v2_1batch.csv --host X.X.X.X --port 27017 mongoexport -d comb -c vcf_file_base_info -o ./vcf_file_base_info.json --host X.X.X.X --port 27017 mongoexport -d comb -c vcf_file_base_info -o ./vcf_file_base_info.json --host X.X.X.X --port 27017 mongoexport -d comb -c sample -o ./sample.json --host X.X.X.X --port 27017 mongoimport -d comb -c gen_positions --file /tmp/all_index.txt --host X.X.X.X --port 27017 p=json.load(open('/tmp/index.json')) f=open('/tmp/a1.txt','w') for ix in p: f.write(' '.join([ix['chromosome'],ix['position'],ix['ref'],ix['alt']])+' ') f.close() mongoexport -d comb -c vcf_file_base_info -o ./vcf_file_base_info_new.json --host X.X.X.X --port 27017 mongoexport -d comb -c sample -o ./sample_new.json --host X.X.X.X --port 27017 mongoimport -d comb -c gen_positions --file /tmp/gen_positions_new.txt --host X.X.X.X --port 27017 db.getCollection('vcf_file_base_info').update({"version":"v1"},{"$set":{"vcf_s3_clean_path":null,"sample_s3_clean_path":null,"snp_s3_clean_path":null}},{"multi":1})
db.getCollection('vcf_file_base_info').find({"created":{$gte:ISODate("2018-12-10 00:00:01")},"vcf_s3_clean_path":{$ne:null}})
db.getCollection('vcf_file_base_info').update({"created":{$gte:ISODate("2018-12-10 00:00:01")},"vcf_s3_clean_path":{$ne:null}} ,{"$set":{"vcf_s3_clean_path":null,"sample_s3_clean_path":null,"snp_s3_clean_path":null}},{"multi":1})