You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have this publically available csv file with scaled and raw counts for single cell data. I proceeded with converting it into a seurat object, then subsetting part of the seurat object based on a group.
This subsetted seurat object was converted into a loom file using SCopeLoomR (code below).
add_cell_annotation <- function(loom, cellAnnotation)
{
cellAnnotation <- data.frame(cellAnnotation)
if(any(c("nGene", "nUMI") %in% colnames(cellAnnotation)))
{
warning("Columns 'nGene' and 'nUMI' will not be added as annotations to the loom file.")
cellAnnotation <- cellAnnotation[,colnames(cellAnnotation) != "nGene", drop=FALSE]
cellAnnotation <- cellAnnotation[,colnames(cellAnnotation) != "nUMI", drop=FALSE]
}
if(ncol(cellAnnotation)<=0) stop("The cell annotation contains no columns")
if(!all(get_cell_ids(loom) %in% rownames(cellAnnotation))) stop("Cell IDs are missing in the annotation")
[1] "Adding matrix..."
|======================================================================| 100%[1] "Adding column attributes..."
[1] "Adding default metrics nGene..."
[1] "Adding default embedding..."
[1] "Adding row attributes..."
[1] "Adding columns graphs..."
[1] "Adding row graphs..."
[1] "Adding layers..."
Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
Default metric nUMI was not added because the input matrix does not seem to be the raw counts.
I proceeded with going forward with the loom file. Created in the config file
nextflow config vib-singlecell-nf/vsn-pipelines \ -profile loom,scenic,scenic_multiruns,scenic_use_cistarget_motifs,scenic_use_cistarget_tracks,hg38,singularity > scenic.config
The scenic.config file (attached) was changed in the following way:
##put data in
#change executor to slurm and add account
process {
executor = 'slurm'
withLabel:'compute_resources__.*|compute_resources__default' {
cpus = 2
memory = '60 GB'
time = '1h'
clusterOptions = '-A b1042'
}
Start to run this and get the error:
N E X T F L O W ~ version 21.04.3
Launching vib-singlecell-nf/vsn-pipelines [agitated_volhard] - revision: 721c42f889 [v0.25.0]
Argument of file function cannot be empty
-- Check script '/home/mks9338/.nextflow/assets/vib-singlecell-nf/vsn-pipelines/main.nf' at line: 743 or see '.nextflow.log' file for more details
I am not sure why it is calling file function empty, any help would be appreciated. I think there might be a problem with my loom file potentially as it does not recognize my raw counts.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have this publically available csv file with scaled and raw counts for single cell data. I proceeded with converting it into a seurat object, then subsetting part of the seurat object based on a group.
This subsetted seurat object was converted into a loom file using SCopeLoomR (code below).
counts <- interferon_high@assays$RNA@data
metadata <- [email protected]
add_cell_annotation <- function(loom, cellAnnotation)
{
cellAnnotation <- data.frame(cellAnnotation)
if(any(c("nGene", "nUMI") %in% colnames(cellAnnotation)))
{
warning("Columns 'nGene' and 'nUMI' will not be added as annotations to the loom file.")
cellAnnotation <- cellAnnotation[,colnames(cellAnnotation) != "nGene", drop=FALSE]
cellAnnotation <- cellAnnotation[,colnames(cellAnnotation) != "nUMI", drop=FALSE]
}
if(ncol(cellAnnotation)<=0) stop("The cell annotation contains no columns")
if(!all(get_cell_ids(loom) %in% rownames(cellAnnotation))) stop("Cell IDs are missing in the annotation")
cellAnnotation <- cellAnnotation[get_cell_ids(loom),,drop=FALSE]
for(cn in colnames(cellAnnotation))
{
add_col_attr(loom=loom, key=cn, value=cellAnnotation[,cn])
}
invisible(loom)
}
loom <- build_loom("data/interferon_high.loom", dgem=counts)
loom <- add_cell_annotation(loom, metadata)
close_loom(loom)
[1] "Adding global attributes..."
[1] "Adding matrix..."
|======================================================================| 100%[1] "Adding column attributes..."
[1] "Adding default metrics nGene..."
[1] "Adding default embedding..."
[1] "Adding row attributes..."
[1] "Adding columns graphs..."
[1] "Adding row graphs..."
[1] "Adding layers..."
Warning message:
In doTryCatch(return(expr), name, parentenv, handler) :
Default metric nUMI was not added because the input matrix does not seem to be the raw counts.
I proceeded with going forward with the loom file. Created in the config file
nextflow config vib-singlecell-nf/vsn-pipelines \ -profile loom,scenic,scenic_multiruns,scenic_use_cistarget_motifs,scenic_use_cistarget_tracks,hg38,singularity > scenic.config
The scenic.config file (attached) was changed in the following way:
##put data in
data {
loom {
file_paths = 'data/interferon_high.loom'
suffix = 'interferon_high.loom'
}
}
#change executor to slurm and add account
process {
executor = 'slurm'
withLabel:'compute_resources__.*|compute_resources__default' {
cpus = 2
memory = '60 GB'
time = '1h'
clusterOptions = '-A b1042'
}
Start to run this and get the error:
N E X T F L O W ~ version 21.04.3
Launching
vib-singlecell-nf/vsn-pipelines
[agitated_volhard] - revision: 721c42f889 [v0.25.0]Argument of
file
function cannot be empty-- Check script '/home/mks9338/.nextflow/assets/vib-singlecell-nf/vsn-pipelines/main.nf' at line: 743 or see '.nextflow.log' file for more details
I am not sure why it is calling file function empty, any help would be appreciated. I think there might be a problem with my loom file potentially as it does not recognize my raw counts.
Beta Was this translation helpful? Give feedback.
All reactions