Beispiel #1
0
def is_runfolder_done(path: typing.Union[str, pathlib.Path]) -> bool:
    path = pathlib.Path(path)
    for name in ("RunParameters.xml", "runParameters.xml"):
        if (path / name).exists():
            markers = runparameters_to_marker_file(
                parse_runparameters_xml(path / name), path / name)
            return all((path / marker).exists() for marker in markers)
    return False  # pragma: no cover
def test_runparameters_to_marker_files_m060205():
    """Test for file from MiSeq M06205."""
    path = "tests/data/run_folder/runParameters-M06205.xml"
    data = parse_runparameters_xml(path)
    assert runparameters_to_marker_file(data, path) == (
        "Basecalling_Netcopy_complete.txt",
        "ImageAnalysis_Netcopy_complete.txt",
    )
Beispiel #3
0
def _post_runinfoxml_create_or_update(logger, session, meta):
    """Actually parse the XML files and apply meta data."""
    path = meta["path"]
    if path.lower().endswith("/runinfo.xml"):
        logger.info("applying RunInfo.xml meta data from %s" % path)
        apply_runinfo_metadata(session, parse_runinfo_xml(path),
                               meta["target"])
    elif path.lower().endswith("/runparameters.xml"):
        values = parse_runparameters_xml(path)
        logger.info("applying runParameters.xml meta data from %s (%d)" %
                    (path, len(values)))
        apply_runparameters_metadata(session, values, meta["target"])
    elif "netcopy_complete" in path.lower():
        netcopy_info = parse_netcopy_complete_txt(path)
        if netcopy_info:
            logger.info("applying Netcopy_complete meta data from %s" % path)
            apply_netcopy_complete_metadata(session, netcopy_info,
                                            meta["target"])
def test_parse_run_parameters_st_k00106():
    """Test for file from HiSeq 4000 ST-K00106."""
    data = parse_runparameters_xml("tests/data/run_folder/runParameters-ST-K00106.xml")
    assert data["%s::scan_number" % RUN_PARAMETERS_AVU_KEY_PREFIX] == "95"
def test_parse_run_parameters_nb502131():
    """Test for file from NextSeq NB502131."""
    data = parse_runparameters_xml("tests/data/run_folder/RunParameters-NB502131.xml")
    assert data["%s::run_number" % RUN_PARAMETERS_AVU_KEY_PREFIX] == "93"
def test_parse_run_parameters_mn00157():
    """Test for file from MiniSeq MN00157."""
    data = parse_runparameters_xml("tests/data/run_folder/RunParameters-MN00157.xml")
    assert data["%s::run_number" % RUN_PARAMETERS_AVU_KEY_PREFIX] == "67"
def test_parse_run_parameters_m060205():
    """Test for file from MiSeq M06205."""
    data = parse_runparameters_xml("tests/data/run_folder/runParameters-M06205.xml")
    assert data["%s::run_number" % RUN_PARAMETERS_AVU_KEY_PREFIX] == "9"
def test_parse_run_parameters_a01077():
    """Test for file from NovaSeq A01077."""
    data = parse_runparameters_xml("tests/data/run_folder/RunParameters-A01077.xml")
    assert data["%s::run_number" % RUN_PARAMETERS_AVU_KEY_PREFIX] == "48"
def test_runparameters_to_marker_files_st_k00106():
    """Test for file from HiSeq 4000 ST-K00106."""
    path = "tests/data/run_folder/runParameters-ST-K00106.xml"
    data = parse_runparameters_xml(path)
    assert runparameters_to_marker_file(data, path) == ("RTAComplete.txt",)
def test_runparameters_to_marker_files_nb502131():
    """Test for file from NextSeq NB502131."""
    path = "tests/data/run_folder/RunParameters-NB502131.xml"
    data = parse_runparameters_xml(path)
    assert runparameters_to_marker_file(data, path) == ("RTAComplete.txt",)
def test_runparameters_to_marker_files_mn00157():
    """Test for file from MiniSeq MN00157."""
    path = "tests/data/run_folder/RunParameters-MN00157.xml"
    data = parse_runparameters_xml(path)
    assert runparameters_to_marker_file(data, path) == ("RTAComplete.txt",)
def test_runparameters_to_marker_files_a01077():
    """Test for file from NovaSeq A01077."""
    path = "tests/data/run_folder/RunParameters-A01077.xml"
    data = parse_runparameters_xml(path)
    assert runparameters_to_marker_file(data, path) == ("CopyComplete.txt",)