File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -526,12 +526,10 @@ def create_snpsection(self):
526526
527527 def create_collection (self ):
528528 """Creates collection entry in database"""
529- if self .db_pusher .read_exists ( "Collections" , { "ID_collection" : self .name } ):
529+ if self .db_pusher .get_collection_by_id ( self .name ):
530530 self .db_pusher .delete_collection (self .name )
531531 for sample in self .pool :
532- self .db_pusher .add_rec (
533- {"ID_collection" : self .name , "CG_ID_sample" : sample }, "Collections"
534- )
532+ self .db_pusher .add_collection (ID_collectiuon = self .name , CG_ID_sample = sample )
535533
536534 addedprojs = []
537535 for sample in self .pool :
@@ -585,7 +583,7 @@ def create_sample(self) -> None:
585583 "method_sequencing" : self .sample ["method_sequencing" ],
586584 }
587585 cg_id = self .sample ["CG_ID_sample" ]
588- if self .db_pusher .read_exists ( "Samples" , { "CG_ID_sample" : cg_id } ):
586+ if self .db_pusher .get_sample_by_cg_id_sample ( cg_id ):
589587 update_data = {k : v for k , v in sample_data .items () if k != "CG_ID_sample" }
590588 self .db_pusher .update_sample ({"CG_ID_sample" : cg_id }, update_data )
591589 else :
You can’t perform that action at this time.
0 commit comments