Skip to Content
DocumentationExporting DataExporting Crosslinks to xiNET and xiVIEW

Exporting Crosslinks to xiNET and xiVIEW

from pyXLMS import __version__ print(f"Installed pyXLMS version: {__version__}")
βœ“
Installed pyXLMS version: 1.5.3
from pyXLMS import parser from pyXLMS import exporter

All 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, 18813.32it/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]
Important

For down-stream analysis with xiNET or xiVIEW you would usually want to only consider high-confidence target crosslinks, either by pre-filtering in the search engine of your choice or via the pyXLMS functions validate() [docsΒ ] and targets_only() [docsΒ ]!

_df = exporter.to_xinet(xls, filename=None)

The function exporter.to_xinet() exports a list of crosslinks to xiNETΒ  format. The tool xiNET is accessible via the link crosslinkviewer.orgΒ . Requires that alpha_proteins, beta_proteins, alpha_proteins_crosslink_positions and beta_proteins_crosslink_positions fields are set for all crosslinks. You can read more about the to_xinet() function and all its parameters here: docs.

Tip

Specifying filename=None will only return the pandasΒ  DataFrame and not write it to disk!

_df = exporter.to_xiview(xls, filename=None)

The function exporter.to_xiview() exports a list of crosslinks to xiVIEWΒ  format. The tool xiVIEW is accessible via the link xiview.orgΒ . Requires that alpha_proteins, beta_proteins, alpha_proteins_crosslink_positions and beta_proteins_crosslink_positions fields are set for all crosslinks. You can read more about the to_xiview() 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