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
Copy file name to clipboardExpand all lines: reconstruction/create_subsamples.py
+17-21Lines changed: 17 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ def getArgs():
18
18
requiredArgGroup.add_argument("-n", "--nsubsamples", type=int, required=True, help="Number of subsamples to generate.")
19
19
optionalArgGroup.add_argument("-s", "--singlecell", action="store_true", default=False, help="Create subsamples for single-cell data instead of aggregate data. By default, this will subsample cells rather than organisms. To override this behavior, use the -o/--organism option to subsample organisms or the -b/--both-organisms-and-cells option to subsample both.")
20
20
optionalArgGroup.add_argument("-o", "--organism", action="store_true", default=False, help="Subsample over organisms, even for single-cell data (this is the default behavior for aggregate data)")
21
-
optionalArgGroup.add_argument("-b", "--both-organisms-and-cells", dest="bothOrganismsAndCells", nargs=2, metavar=("ORGANISM_NSUBSAMPLES", "ORGANISM_PROPORTION"), help="Subsample over organisms, then over cells (only applicable to single-cell, -s). The additional arguments are the number of times to sample the organisms and the proportion of organisms in each treatment to use for each subsample. For each sample of organisms, the cells in each organism will be sampled within their cell type NSUBSAMPLES (-n/--nsubsamples) times with proportion PROPORTION (-p/--proportion). This will produce a total of ORGANISM_NSUBSAMPLES * NSUBSAMPLES subsamples. Proportion must satisfy 0 < p < 1.")
21
+
optionalArgGroup.add_argument("-b", "--both-organisms-and-cells", dest="bothOrganismsAndCells", nargs=1, metavar="ORGANISM_PROPORTION", help="Subsample over organisms and cells (only applicable to single-cell, -s). The additional argument is the proportion of organisms in each treatment to use for each subsample and must satisfy 0 < p < 1.")
22
22
optionalArgGroup.add_argument("-h", "--help", action="help", help="Show this help message and exit")
23
23
args=parser.parse_args()
24
24
@@ -43,8 +43,7 @@ def getArgs():
43
43
raiseException("Can only use -b/--both-organisms-and-single-cells with single-cell data (-s/--singlecell).")
0 commit comments