Пример #1
0
def run_preflight_checks(args):
    print "Checking sample info..."
    cr_preflight.check_sample_def(args.sample_def)

    print "Checking reference..."
    cr_preflight.check_refdata(args.reference_path)

    print "Checking chemistry..."
    cr_preflight.check_chemistry(args.chemistry_name, args.custom_chemistry_def,
                                 args.allowed_chems)

    if args.r1_length is not None:
        print "Checking read 1 length..."
        cr_preflight.check_read_length(args.r1_length)
    if args.r2_length is not None:
        print "Checking read 2 length..."
        cr_preflight.check_read_length(args.r2_length)

    # Open file handles limit - per CELLRANGER-824, only check this on the execution machine.
    # We can tell if we're on the execution machine by looking at args.check_executables
    if args.check_executables:
        print "Checking system environment..."
        cr_preflight.check_environment()

    print "Checking optional arguments..."
    if args.recovered_cells is not None and args.force_cells is not None:
        raise cr_preflight.PreflightException("Cannot specify both --force-cells and --expect-cells in the same run.")
Пример #2
0
def run_preflight_checks(args):

    if args.feature_reference is not None:
        print "Checking feature definition file..."
        feature_ref = cr_preflight.check_feature_ref(args.reference_path,
                                                     args.feature_reference)
    else:
        feature_ref = None

    print "Checking sample info..."
    cr_preflight.check_sample_def(args.sample_def,
                                  feature_ref,
                                  pipeline=PIPELINE_COUNT)

    # If any non "Gene Expression" libraries are present then the feature-ref is required.
    if any((x.get("library_type") != None
            and x.get("library_type") != GENE_EXPRESSION_LIBRARY_TYPE)
           for x in args.sample_def):
        if args.feature_reference is None:
            raise cr_preflight.PreflightException(
                "You must specify --feature-ref when using Cell Ranger with feature barcoding libraries."
            )

    # At least one "Gene Expression" library is required.
    # Treat an empty library_type as GENE_EXPRESSION
    if not any(
            x.get("library_type") == GENE_EXPRESSION_LIBRARY_TYPE
            or x.get("library_type") == None for x in args.sample_def):
        raise cr_preflight.PreflightException(
            "You must specify >= 1 input library with library_type == '%s' to run 'cellranger count'"
            % GENE_EXPRESSION_LIBRARY_TYPE)

    print "Checking reference..."
    cr_preflight.check_refdata(args.reference_path)

    print "Checking chemistry..."
    cr_preflight.check_chemistry(args.chemistry_name,
                                 args.custom_chemistry_def, args.allowed_chems)

    if args.r1_length is not None:
        print "Checking read 1 length..."
        cr_preflight.check_read_length(args.r1_length)
    if args.r2_length is not None:
        print "Checking read 2 length..."
        cr_preflight.check_read_length(args.r2_length)

    # Open file handles limit - per CELLRANGER-824, only check this on the execution machine.
    # We can tell if we're on the execution machine by looking at args.check_executables
    if args.check_executables:
        print "Checking system environment..."
        cr_preflight.check_environment()

    print "Checking optional arguments..."
    if args.recovered_cells is not None and args.force_cells is not None:
        raise cr_preflight.PreflightException(
            "Cannot specify both --force-cells and --expect-cells in the same run."
        )
Пример #3
0
def run_preflight_checks(args):
    print "Checking sample info..."
    cr_preflight.check_sample_def(args.sample_def)

    # Don't check the GEX reference if we are just distinguishing between SCVDJ seq configs
    if 'SCVDJ' not in args.chemistry_name_spec:
        print "Checking reference..."
        cr_preflight.check_refdata(args.reference_path)

    if args.vdj_reference_path is not None:
        print "Checking V(D)J reference..."
        vdj_preflight.check_refdata(args.vdj_reference_path, True)
Пример #4
0
def run_preflight_checks(args):
    print "Checking sample info..."
    cr_preflight.check_sample_def(args.sample_def)

    print "Checking reference..."
    vdj_preflight.check_refdata(args.vdj_reference_path, args.denovo)

    print "Checking chain..."
    vdj_preflight.check_chain(args.chain_type)

    print "Checking chemistry..."
    cr_preflight.check_chemistry(args.chemistry_name,
                                 args.custom_chemistry_def, None)

    # Open file handles limit - per CELLRANGER-824, only check this on the execution machine.
    # We can tell if we're on the execution machine by looking at args.check_executables
    if args.check_executables:
        print "Checking system environment..."
        cr_preflight.check_environment()