Skip to content

Commit

Permalink
fix untarg data import
Browse files Browse the repository at this point in the history
- remove unnecessary column by name instead of index
- prevent dropping of columns
  • Loading branch information
grlloyd committed Jun 27, 2024
1 parent 36c0820 commit 269f3e6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/class_def.R
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ setMethod(f = 'do_query',
return(out)
} else if (input_item$name == 'analysis_id') {
df = do_query(context$name,input_item$name,input_value,'datatable')
nf=attributes(df)$number_of_factors
nf = attributes(df)$number_of_factors

X=as.data.frame(t(df))

Expand Down Expand Up @@ -869,10 +869,10 @@ setMethod(f = 'do_query',
df = do_query(context$name,input_item$name,input_value,'untarg_data')
fq = do_query('study','analysis_id',input_value,'untarg_factors')

fq=fq[,-1]
fq$count=NULL

SM=as.data.frame(df[,colnames(fq)])
df[,colnames(fq)]=NULL
SM=df[,colnames(fq),drop=FALSE]
df[,colnames(fq),drop=FALSE]=NULL

df=as.data.frame(t(df))
VM=data.frame(feature_id=rownames(df))
Expand Down

0 comments on commit 269f3e6

Please sign in to comment.