@@ -488,7 +488,7 @@ async function load_sce_components(se_path, navigator) {
488
488
}
489
489
490
490
if ( listing . indexOf ( "column_data" ) != - 1 ) {
491
- let col_path = this . #path + "/column_data" ;
491
+ let col_path = se_path + "/column_data" ;
492
492
main . cells = await load_data_frame ( col_path , navigator ) ;
493
493
} else {
494
494
main . cells = new bioc . DataFrame ( { } , { numberOfRows : obj_info . summarized_experiment . dimensions [ 1 ] } ) ;
@@ -816,8 +816,6 @@ export class AbstractTakeneResult {
816
816
#path;
817
817
#navigator;
818
818
#raw_components;
819
- #raw_other;
820
- #raw_
821
819
#options;
822
820
823
821
/**
@@ -832,7 +830,6 @@ export class AbstractTakeneResult {
832
830
this . #path = path ;
833
831
this . #navigator = new TakaneNavigator ( getter , lister ) ;
834
832
this . #raw_components = null ;
835
- this . #raw_other = null ;
836
833
this . #options = AbstractTakeneResult . defaults ( ) ;
837
834
}
838
835
@@ -884,7 +881,6 @@ export class AbstractTakeneResult {
884
881
*/
885
882
clear ( ) {
886
883
this . #raw_components = null ;
887
- this . #raw_other = null ;
888
884
this . #navigator. clear ( ) ;
889
885
}
890
886
@@ -986,9 +982,9 @@ export class AbstractTakeneResult {
986
982
let output = {
987
983
matrix : new scran . MultiMatrix ,
988
984
features : { } ,
989
- cells : this . #raw_cells ,
985
+ cells : comp . core . main . cells ,
990
986
reduced_dimensions : { } ,
991
- other_metadata : this . #raw_other
987
+ other_metadata : comp . other ,
992
988
} ;
993
989
994
990
// Fetch the reduced dimensions first.
@@ -1037,49 +1033,40 @@ export class AbstractTakeneResult {
1037
1033
1038
1034
// Now fetching the assay matrix.
1039
1035
{
1040
- const altmap = { } ;
1041
- for ( const alt of comp . alternative ) {
1042
- altmap [ alt . name ] = alt ;
1043
- }
1044
-
1045
- try {
1046
- for ( const [ k , v ] of Object . entries ( this . #raw_features) ) {
1047
- let curassay = this . #options. primaryAssay ;
1048
- if ( typeof curassay == "object" ) {
1049
- if ( k in curassay ) {
1050
- curassay = curassay [ k ] ;
1051
- } else {
1052
- continue ;
1053
- }
1054
- }
1055
-
1056
- let curnormalized = this . #options. isPrimaryNormalized ;
1057
- if ( typeof curnormalized == "object" ) {
1058
- if ( k in curnormalized ) {
1059
- curnormalized = curnormalized [ k ] ;
1060
- } else {
1061
- curnormalized = true ;
1062
- }
1036
+ async function add_experiment ( name , info ) {
1037
+ let curassay = this . #options. primaryAssay ;
1038
+ if ( typeof curassay == "object" ) {
1039
+ if ( name in curassay ) {
1040
+ curassay = curassay [ name ] ;
1041
+ } else {
1042
+ return ;
1063
1043
}
1044
+ }
1064
1045
1065
- let info ;
1066
- if ( k === comp . core . main . name ) {
1067
- info = comp . core . main ;
1068
- } else if ( k in altmap ) {
1069
- info = altmap [ k ] ;
1046
+ let curnormalized = this . #options. isPrimaryNormalized ;
1047
+ if ( typeof curnormalized == "object" ) {
1048
+ if ( name in curnormalized ) {
1049
+ curnormalized = curnormalized [ name ] ;
1050
+ } else {
1051
+ curnormalized = true ;
1070
1052
}
1053
+ }
1071
1054
1072
- let loaded = await extract_assay ( info . path , curassay , this . #navigator, ! curnormalized ) ;
1073
- output . matrix . add ( k , loaded ) ;
1055
+ let loaded = await extract_assay ( info . path , curassay , this . #navigator, ! curnormalized ) ;
1056
+ output . matrix . add ( name , loaded ) ;
1057
+ if ( ! curnormalized ) {
1058
+ let normed = scran . logNormCounts ( loaded , { allowZeros : true } ) ;
1059
+ output . matrix . add ( name , normed ) ;
1060
+ }
1074
1061
1075
- if ( ! curnormalized ) {
1076
- let normed = scran . logNormCounts ( loaded , { allowZeros : true } ) ;
1077
- output . matrix . add ( k , normed ) ;
1078
- }
1062
+ output . features [ name ] = info . features ;
1063
+ }
1079
1064
1080
- output . features [ k ] = info . features ;
1065
+ try {
1066
+ add_experiment ( comp . core . main . name , comp . core . main ) ;
1067
+ for ( const [ k , v ] of Object . entries ( comp . core . alternative ) ) {
1068
+ add_experiment ( k , v ) ;
1081
1069
}
1082
-
1083
1070
} catch ( e ) {
1084
1071
scran . free ( output . matrix ) ;
1085
1072
throw e ;
0 commit comments