예제 #1
0
def validate_input(input_spec: InputSpec):
    """Make sure required input directories exist

    Args:
        input_spec (InputSpec): input file specification
    """
    assert input_spec.validate()
예제 #2
0
def test_validate_fails_missing():
    df = pd.DataFrame([{
        "filepath":
        Path("tests/test_files/full_scan_nat_rep1.mzml"),
    }])
    inp = InputSpec(df)
    assert inp.validate() == False
예제 #3
0
def test_validate_fails_missing():
    df = pd.DataFrame([{
        "filepath": Path("missing"),
        "organism": "org1",
        "type": "f",
        "element": "c",
        "isotope": 13,
        "condition": "cond1",
        "replicate": 1,
    }])
    inp = InputSpec(df)
    assert inp.validate() == False
예제 #4
0
def test_validate_fails_duplicated():
    df = pd.DataFrame([
        {
            "filepath": Path("tests/test_files/full_scan_nat_rep1.mzml"),
            "organism": "org1",
            "type": "f",
            "element": "c",
            "isotope": 13,
            "condition": "cond1",
            "replicate": 1,
        },
        {
            "filepath": Path("tests/test_files/full_scan_nat_rep1.mzml"),
            "organism": "org1",
            "type": "f",
            "element": "c",
            "isotope": 13,
            "condition": "cond1",
            "replicate": 2,
        },
    ])
    inp = InputSpec(df)
    assert inp.validate() == False