Exporting Crosslinks to XMAS
from pyXLMS import __version__
print(f"Installed pyXLMS version: {__version__}")β
Installed pyXLMS version: 1.5.3from pyXLMS import parser
from pyXLMS import exporterAll exporting functionality is available via the exporter submodule. We also import the parser submodule to read crosslink-spectrum-matches and crosslinks.
parser_result = parser.read(
"../../data/ms_annika/XLpeplib_Beveridge_QEx-HFX_DSS_R1_Crosslinks.xlsx",
engine="MS Annika",
crosslinker="DSS",
)
xls = parser_result["crosslinks"]β
Reading MS Annika crosslinks...: 100%|ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ| 300/300 [00:00<00:00, 17341.39it/s]We read crosslinks using the generic parserΒ from a single MS Annika .xlsx file. For easier access we also assign our crosslinks to the variable xls.
from pyXLMS.transform import validate, targets_only
xls = targets_only(validate(xls))β
Iterating over scores for FDR calculation...: 25%|ββββββββββββββββββ | 74/300 [00:00<?, ?it/s]_df = exporter.to_xmas(xls, filename=None)The function exporter.to_xmas() exports a list of crosslinks to XMASΒ format for visualization in ChimeraXΒ . The tool XMAS is accessible via the link github.com/ScheltemaLab/ChimeraX_XMAS_bundleΒ or directly via the ChimeraX ToolshedΒ . You can read more about the to_xmas() function and all its parameters here: docs.
Tip
Specifying filename=None will only return the pandasΒ DataFrame and not write it to disk!
Last updated on