@@ -481,8 +481,8 @@ def test_make_fastqs_10x_chromium_sc_protocol_illumina_indices(self):
481481 "Missing file: %s" % filen )
482482
483483 #@unittest.skip("Skipped")
484- def test_make_fastqs_10x_atac_protocol (self ):
485- """make_fastqs: 10x_atac protocol
484+ def test_make_fastqs_10x_atac_protocol_10x_indexes (self ):
485+ """make_fastqs: 10x_atac protocol (10x indexes)
486486 """
487487 # Sample sheet with 10xGenomics SC ATAC-seq indices
488488 samplesheet_10x_atac_indices = """[Data]
@@ -550,6 +550,73 @@ def test_make_fastqs_10x_atac_protocol(self):
550550 os .path .join (analysis_dir ,filen )),
551551 "Missing file: %s" % filen )
552552
553+ #@unittest.skip("Skipped")
554+ def test_make_fastqs_10x_atac_protocol_illumina_indexes (self ):
555+ """make_fastqs: 10x_atac protocol (Illumina indexes)
556+ """
557+ # Sample sheet with 10xGenomics SC ATAC-seq Illumina indices
558+ samplesheet_10x_atac_indices = """[Data]
559+ Sample_ID,Sample_Name,Sample_Plate,Sample_Well,I7_Index_ID,index,Sample_Project,Description
560+ smpl1,smpl1,,,SI-NA-A1,TGTCCCAACG,10xGenomics,
561+ smpl2,smpl2,,,SI-NA-B1,AGTCCCATCA,10xGenomics,
562+ """
563+ sample_sheet = os .path .join (self .wd ,"SampleSheet.csv" )
564+ with open (sample_sheet ,'w' ) as fp :
565+ fp .write (samplesheet_10x_atac_indices )
566+ # Create mock source data
567+ illumina_run = MockIlluminaRun (
568+ "171020_NB500968_00002_AHGXXXX" ,
569+ "nextseq" ,
570+ bases_mask = "y101,I8,I8,y101" ,
571+ top_dir = self .wd )
572+ illumina_run .create ()
573+ # Create mock bcl2fastq
574+ MockBcl2fastq2Exe .create (os .path .join (self .bin ,
575+ "bcl2fastq" ))
576+ os .environ ['PATH' ] = "%s:%s" % (self .bin ,
577+ os .environ ['PATH' ])
578+ # Do the test
579+ ap = AutoProcess (settings = self .settings )
580+ ap .setup (os .path .join (self .wd ,
581+ "171020_NB500968_00002_AHGXXXX" ),
582+ sample_sheet = sample_sheet )
583+ self .assertTrue (ap .params .sample_sheet is not None )
584+ self .assertEqual (ap .params .bases_mask ,"auto" )
585+ self .assertTrue (ap .params .primary_data_dir is None )
586+ self .assertFalse (ap .params .acquired_primary_data )
587+ make_fastqs (ap ,protocol = "10x_atac" )
588+ # Check parameters
589+ self .assertEqual (ap .params .bases_mask ,"auto" )
590+ self .assertEqual (ap .params .primary_data_dir ,
591+ os .path .join (self .wd ,
592+ "171020_NB500968_00002_AHGXXXX_analysis" ,
593+ "primary_data" ))
594+ self .assertTrue (ap .params .acquired_primary_data )
595+ self .assertEqual (ap .params .unaligned_dir ,"bcl2fastq" )
596+ self .assertEqual (ap .params .barcode_analysis_dir ,"barcode_analysis" )
597+ self .assertEqual (ap .params .stats_file ,"statistics.info" )
598+ # Check outputs
599+ analysis_dir = os .path .join (
600+ self .wd ,
601+ "171020_NB500968_00002_AHGXXXX_analysis" )
602+ for subdir in (os .path .join ("primary_data" ,
603+ "171020_NB500968_00002_AHGXXXX" ),
604+ os .path .join ("logs" ,
605+ "002_make_fastqs_10x_atac" ),
606+ "bcl2fastq" ,):
607+ self .assertTrue (os .path .isdir (
608+ os .path .join (analysis_dir ,subdir )),
609+ "Missing subdir: %s" % subdir )
610+ for filen in ("statistics.info" ,
611+ "statistics_full.info" ,
612+ "per_lane_statistics.info" ,
613+ "per_lane_sample_stats.info" ,
614+ "projects.info" ,
615+ "processing_qc.html" ):
616+ self .assertTrue (os .path .isfile (
617+ os .path .join (analysis_dir ,filen )),
618+ "Missing file: %s" % filen )
619+
553620 #@unittest.skip("Skipped")
554621 def test_make_fastqs_10x_visium_protocol (self ):
555622 """make_fastqs: 10x_visium protocol
@@ -764,8 +831,8 @@ def test_make_fastqs_10x_visium_protocol_reverse_complement_workflow_B(self):
764831 "Missing file: %s" % filen )
765832
766833 #@unittest.skip("Skipped")
767- def test_make_fastqs_10x_multiome_protocol_gex (self ):
768- """make_fastqs: 10x_multiome protocol (GEX data )
834+ def test_make_fastqs_10x_multiome_gex_protocol_10x_indexes (self ):
835+ """make_fastqs: 10x_multiome_gex protocol (10x indexes )
769836 """
770837 # Sample sheet with 10xGenomics indices
771838 samplesheet_10x_atac_indices = """[Data]
@@ -800,7 +867,74 @@ def test_make_fastqs_10x_multiome_protocol_gex(self):
800867 self .assertEqual (ap .params .bases_mask ,"auto" )
801868 self .assertTrue (ap .params .primary_data_dir is None )
802869 self .assertFalse (ap .params .acquired_primary_data )
803- make_fastqs (ap ,protocol = "10x_multiome" )
870+ make_fastqs (ap ,protocol = "10x_multiome_gex" )
871+ # Check parameters
872+ self .assertEqual (ap .params .bases_mask ,"auto" )
873+ self .assertEqual (ap .params .primary_data_dir ,
874+ os .path .join (self .wd ,
875+ "171020_NB500968_00002_AHGXXXX_analysis" ,
876+ "primary_data" ))
877+ self .assertTrue (ap .params .acquired_primary_data )
878+ self .assertEqual (ap .params .unaligned_dir ,"bcl2fastq" )
879+ self .assertEqual (ap .params .barcode_analysis_dir ,"barcode_analysis" )
880+ self .assertEqual (ap .params .stats_file ,"statistics.info" )
881+ # Check outputs
882+ analysis_dir = os .path .join (
883+ self .wd ,
884+ "171020_NB500968_00002_AHGXXXX_analysis" )
885+ for subdir in (os .path .join ("primary_data" ,
886+ "171020_NB500968_00002_AHGXXXX" ),
887+ os .path .join ("logs" ,
888+ "002_make_fastqs_10x_multiome_gex" ),
889+ "bcl2fastq" ,):
890+ self .assertTrue (os .path .isdir (
891+ os .path .join (analysis_dir ,subdir )),
892+ "Missing subdir: %s" % subdir )
893+ for filen in ("statistics.info" ,
894+ "statistics_full.info" ,
895+ "per_lane_statistics.info" ,
896+ "per_lane_sample_stats.info" ,
897+ "projects.info" ,
898+ "processing_qc.html" ):
899+ self .assertTrue (os .path .isfile (
900+ os .path .join (analysis_dir ,filen )),
901+ "Missing file: %s" % filen )
902+
903+ #@unittest.skip("Skipped")
904+ def test_make_fastqs_10x_multiome_gex_protocol_illumina_indexes (self ):
905+ """make_fastqs: 10x_multiome_gex protocol (Illumina indexes)
906+ """
907+ # Sample sheet with 10xGenomics indices
908+ samplesheet_10x_atac_indices = """[Data]
909+ Sample_ID,Sample_Name,Sample_Plate,Sample_Well,I7_Index_ID,index,Sample_Project,Description
910+ smpl1,smpl1,,,SI-TT-A1,TGTCCCAACG,10xGenomics,
911+ smpl2,smpl2,,,SI-TT-B1,AGTCCCATCA,10xGenomics,
912+ """
913+ sample_sheet = os .path .join (self .wd ,"SampleSheet.csv" )
914+ with open (sample_sheet ,'w' ) as fp :
915+ fp .write (samplesheet_10x_atac_indices )
916+ # Create mock source data
917+ illumina_run = MockIlluminaRun (
918+ "171020_NB500968_00002_AHGXXXX" ,
919+ "nextseq" ,
920+ bases_mask = "y101,I8,I8,y101" ,
921+ top_dir = self .wd )
922+ illumina_run .create ()
923+ # Create mock bcl2fastq
924+ MockBcl2fastq2Exe .create (os .path .join (self .bin ,
925+ "bcl2fastq" ))
926+ os .environ ['PATH' ] = "%s:%s" % (self .bin ,
927+ os .environ ['PATH' ])
928+ # Do the test
929+ ap = AutoProcess (settings = self .settings )
930+ ap .setup (os .path .join (self .wd ,
931+ "171020_NB500968_00002_AHGXXXX" ),
932+ sample_sheet = sample_sheet )
933+ self .assertTrue (ap .params .sample_sheet is not None )
934+ self .assertEqual (ap .params .bases_mask ,"auto" )
935+ self .assertTrue (ap .params .primary_data_dir is None )
936+ self .assertFalse (ap .params .acquired_primary_data )
937+ make_fastqs (ap ,protocol = "10x_multiome_gex" )
804938 # Check parameters
805939 self .assertEqual (ap .params .bases_mask ,"auto" )
806940 self .assertEqual (ap .params .primary_data_dir ,
@@ -818,7 +952,7 @@ def test_make_fastqs_10x_multiome_protocol_gex(self):
818952 for subdir in (os .path .join ("primary_data" ,
819953 "171020_NB500968_00002_AHGXXXX" ),
820954 os .path .join ("logs" ,
821- "002_make_fastqs_10x_multiome " ),
955+ "002_make_fastqs_10x_multiome_gex " ),
822956 "bcl2fastq" ,):
823957 self .assertTrue (os .path .isdir (
824958 os .path .join (analysis_dir ,subdir )),
@@ -834,8 +968,8 @@ def test_make_fastqs_10x_multiome_protocol_gex(self):
834968 "Missing file: %s" % filen )
835969
836970 #@unittest.skip("Skipped")
837- def test_make_fastqs_10x_multiome_protocol_atac (self ):
838- """make_fastqs: 10x_multiome protocol (ATAC data )
971+ def test_make_fastqs_10x_multiome_atac_protocol_10x_indexes (self ):
972+ """make_fastqs: 10x_multiome_atac protocol (10x indexes )
839973 """
840974 # Sample sheet with 10xGenomics indices
841975 samplesheet_10x_atac_indices = """[Data]
@@ -870,7 +1004,74 @@ def test_make_fastqs_10x_multiome_protocol_atac(self):
8701004 self .assertEqual (ap .params .bases_mask ,"auto" )
8711005 self .assertTrue (ap .params .primary_data_dir is None )
8721006 self .assertFalse (ap .params .acquired_primary_data )
873- make_fastqs (ap ,protocol = "10x_multiome" )
1007+ make_fastqs (ap ,protocol = "10x_multiome_atac" )
1008+ # Check parameters
1009+ self .assertEqual (ap .params .bases_mask ,"auto" )
1010+ self .assertEqual (ap .params .primary_data_dir ,
1011+ os .path .join (self .wd ,
1012+ "171020_NB500968_00002_AHGXXXX_analysis" ,
1013+ "primary_data" ))
1014+ self .assertTrue (ap .params .acquired_primary_data )
1015+ self .assertEqual (ap .params .unaligned_dir ,"bcl2fastq" )
1016+ self .assertEqual (ap .params .barcode_analysis_dir ,"barcode_analysis" )
1017+ self .assertEqual (ap .params .stats_file ,"statistics.info" )
1018+ # Check outputs
1019+ analysis_dir = os .path .join (
1020+ self .wd ,
1021+ "171020_NB500968_00002_AHGXXXX_analysis" )
1022+ for subdir in (os .path .join ("primary_data" ,
1023+ "171020_NB500968_00002_AHGXXXX" ),
1024+ os .path .join ("logs" ,
1025+ "002_make_fastqs_10x_multiome_atac" ),
1026+ "bcl2fastq" ,):
1027+ self .assertTrue (os .path .isdir (
1028+ os .path .join (analysis_dir ,subdir )),
1029+ "Missing subdir: %s" % subdir )
1030+ for filen in ("statistics.info" ,
1031+ "statistics_full.info" ,
1032+ "per_lane_statistics.info" ,
1033+ "per_lane_sample_stats.info" ,
1034+ "projects.info" ,
1035+ "processing_qc.html" ):
1036+ self .assertTrue (os .path .isfile (
1037+ os .path .join (analysis_dir ,filen )),
1038+ "Missing file: %s" % filen )
1039+
1040+ #@unittest.skip("Skipped")
1041+ def test_make_fastqs_10x_multiome_atac_protocol_illumina_indexes (self ):
1042+ """make_fastqs: 10x_multiome_atac protocol (Illumina indexes)
1043+ """
1044+ # Sample sheet with 10xGenomics indices
1045+ samplesheet_10x_atac_indices = """[Data]
1046+ Sample_ID,Sample_Name,Sample_Plate,Sample_Well,I7_Index_ID,index,Sample_Project,Description
1047+ smpl1,smpl1,,,SI-TT-A1,TGTCCCAACG,10xGenomics,
1048+ smpl2,smpl2,,,SI-TT-B1,AGTCCCATCA,10xGenomics,
1049+ """
1050+ sample_sheet = os .path .join (self .wd ,"SampleSheet.csv" )
1051+ with open (sample_sheet ,'w' ) as fp :
1052+ fp .write (samplesheet_10x_atac_indices )
1053+ # Create mock source data
1054+ illumina_run = MockIlluminaRun (
1055+ "171020_NB500968_00002_AHGXXXX" ,
1056+ "nextseq" ,
1057+ bases_mask = "y101,I8,I8,y101" ,
1058+ top_dir = self .wd )
1059+ illumina_run .create ()
1060+ # Create mock bcl2fastq
1061+ MockBcl2fastq2Exe .create (os .path .join (self .bin ,
1062+ "bcl2fastq" ))
1063+ os .environ ['PATH' ] = "%s:%s" % (self .bin ,
1064+ os .environ ['PATH' ])
1065+ # Do the test
1066+ ap = AutoProcess (settings = self .settings )
1067+ ap .setup (os .path .join (self .wd ,
1068+ "171020_NB500968_00002_AHGXXXX" ),
1069+ sample_sheet = sample_sheet )
1070+ self .assertTrue (ap .params .sample_sheet is not None )
1071+ self .assertEqual (ap .params .bases_mask ,"auto" )
1072+ self .assertTrue (ap .params .primary_data_dir is None )
1073+ self .assertFalse (ap .params .acquired_primary_data )
1074+ make_fastqs (ap ,protocol = "10x_multiome_atac" )
8741075 # Check parameters
8751076 self .assertEqual (ap .params .bases_mask ,"auto" )
8761077 self .assertEqual (ap .params .primary_data_dir ,
@@ -888,7 +1089,7 @@ def test_make_fastqs_10x_multiome_protocol_atac(self):
8881089 for subdir in (os .path .join ("primary_data" ,
8891090 "171020_NB500968_00002_AHGXXXX" ),
8901091 os .path .join ("logs" ,
891- "002_make_fastqs_10x_multiome " ),
1092+ "002_make_fastqs_10x_multiome_atac " ),
8921093 "bcl2fastq" ,):
8931094 self .assertTrue (os .path .isdir (
8941095 os .path .join (analysis_dir ,subdir )),
0 commit comments