Hi @smorabit,
I have a question regarding the following lines 180-181 in ApplyPerturbation.R from commit f0135ec and 61054a1:
exp_new <- exp_new[rownames(exp), colnames(seurat_obj)]
exp_new <- exp_new[rownames(exp), ]
I’m trying to understand the purpose of the second subsetting step:
exp_new <- exp_new[rownames(exp), ]
Since the first line already subsets both rows and columns, including rownames(exp), it seems like the second line re-applies the same row filtering.
My questions:
Is the second line intended as a safeguard to ensure row ordering or consistency?
Could this be redundant, or is there a specific edge case where this additional subsetting is necessary?
Would it be safe to remove the second line without affecting downstream behavior?
Hi @smorabit,
I have a question regarding the following lines 180-181 in ApplyPerturbation.R from commit f0135ec and 61054a1:
I’m trying to understand the purpose of the second subsetting step:
exp_new <- exp_new[rownames(exp), ]Since the first line already subsets both rows and columns, including rownames(exp), it seems like the second line re-applies the same row filtering.
My questions:
Is the second line intended as a safeguard to ensure row ordering or consistency?
Could this be redundant, or is there a specific edge case where this additional subsetting is necessary?
Would it be safe to remove the second line without affecting downstream behavior?