-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add step to repeat cell cycle scoring
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
for (datasetId in names(seuratObjects)) { | ||
printName(datasetId) | ||
seuratObj <- readSeuratRDS(seuratObjects[[datasetId]]) | ||
|
||
seuratObj <- CellMembrane::ScoreCellCycle(seuratObj, useAlternateG2M = useAlternateG2M) | ||
|
||
saveData(seuratObj, datasetId) | ||
|
||
# Cleanup | ||
rm(seuratObj) | ||
gc() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
singlecell/src/org/labkey/singlecell/pipeline/singlecell/ScoreCellCycle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package org.labkey.singlecell.pipeline.singlecell; | ||
|
||
import org.json.JSONObject; | ||
import org.labkey.api.sequenceanalysis.pipeline.AbstractPipelineStepProvider; | ||
import org.labkey.api.sequenceanalysis.pipeline.PipelineContext; | ||
import org.labkey.api.singlecell.pipeline.SeuratToolParameter; | ||
import org.labkey.api.singlecell.pipeline.SingleCellStep; | ||
|
||
import java.util.Arrays; | ||
|
||
public class ScoreCellCycle extends AbstractCellMembraneStep | ||
{ | ||
public ScoreCellCycle(PipelineContext ctx, ScoreCellCycle.Provider provider) | ||
{ | ||
super(provider, ctx); | ||
} | ||
|
||
public static class Provider extends AbstractPipelineStepProvider<SingleCellStep> | ||
{ | ||
public Provider() | ||
{ | ||
super("ScoreCellCycle", "Score Cell Cycle", "CellMembrane/Seurat", "This will score cells by cell cycle phase.", Arrays.asList( | ||
SeuratToolParameter.create("useAlternateG2M", "Use Alternate G2M Genes", "If checked, this will use a smaller set of G2M genes, defined from: https://raw.githubusercontent.com/hbc/tinyatlas/master/cell_cycle/Homo_sapiens.csv", "checkbox", new JSONObject(){{ | ||
put("checked", true); | ||
}}, true) | ||
), null, null); | ||
} | ||
|
||
@Override | ||
public ScoreCellCycle create(PipelineContext ctx) | ||
{ | ||
return new ScoreCellCycle(ctx, this); | ||
} | ||
} | ||
|
||
@Override | ||
public String getFileSuffix() | ||
{ | ||
return "cc"; | ||
} | ||
} | ||
|