Functions documentation for write functions

xTable

  • Write to: Directory in which to save xTable file

Functions to read and write xTable data.

croco.xTable.Read(xTable_files, col_order=None, compact=False)[source]

Read an xTable data structure from file

Parameters:
  • xTable_files – path to the xtable file(s)
  • col_order (list) – List of xTable column titles that are used to sort and compress the resulting datatable
  • compact (bool) – Whether to compact the xTable to only those columns listed in col_order
Returns:

xTable dataframe object

Return type:

xtable

croco.xTable.Write(xtable, outpath, col_order=None, compact=False)[source]

writes an xtable data structure to file (in xlsx format)

Parameters:
  • xtable – data table structure
  • to write file (outpath) –
  • col_order (list) – List of xTable column titles that are used to sort and compress the resulting datatable
  • compact (bool) – Whether to compact the xTable to only those columns listed in col_order

xWalk

The xWalk (http://xwalk.org) command line tool can be utilised to compare experimental cross-links with an available three-dimensional model (e.g. a crystal structure). CroCo can generate a list of cross-linked atoms with the corresponding indices as required for xWalk. To use xWalk in your analysis, select “xWalk” as output format in CroCo and provide the following information:

  • Write to: Directory in which to save xWalk file
  • OptionsWindow:
    • PDB to map xlinks: Name of a PDB file that should be analysed by xWalk
    • Offset: shift between PDB AA indices and the xTable
    • Chains: comma separated list of protein:chain allocations, e.g. ProteinA:AB, ProteinB:C
    • PDB Atom code (Text): A PDB atom code (e.g. CB) that should be used for distance calculation

The generated file (FILENAME_xWalk.tsv) is then used as input for xWalk as follows (the complete documentation of xWalk parameters can be found by calling ´´java Xwalk –help´´)

Functions to write data as input for xWalk.

croco.xWalk.Write(xtable, outpath, pdb, offset, chains, atom)[source]

Convert xTable into a list format that can be used as input for the xWalk standalone programme.

Format is:

index pdb-file RESIDUE-NO–ATOM RESIDUE-NO–ATOM

As xWalk can only validate one protein at a time, the function generates several oouput files for all intra-protein cross-links

Parameters:
  • xtable (pandas.DataFrame) – data table structure
  • pdb (str) – PDB-file name
  • offset (list or str) – shift between PDB AA indices and the xTable
  • chains – (dict or str) comma separated list protein:chain allocations
  • atom (str) – Atom identifier (e.g. CB)
  • outpath (str) – path to write file

xVis

  • Write to: Directory in which to save xVis file

Functions to write data structures as input for the xVis webserver (https://xvis.genzentrum.lmu.de/CrossVisNoLogin.php).

croco.xVis.Write(xtable, outpath)[source]

Convert xtable data structure to cross-link data file for xVis data visualisation tool

Parameters:
  • xtable (pandas.DataFrame) – data table structure
  • outpath (str) – path to write file

customTable

  • Write to: Directory in which to save the customTable csv file
  • OptionsWindow: customTable template file

customTable Format

[header]
Protein 1, Protein 2
[data]
[prot1], [prot2]
[footer]
This is the footer of the file
  • Everything between [header] and [data] is considered the header and is printed once on top of the output file
  • In the [data] block columns identified by their xTable header are written in substitution of the header name.
    • E.g. instead of [prot1], [prot2] a line like SPA_STAAU,  IgG4_heavy is written for every line in the xTable file
    • Everything not enclosed in brackets will be written as is
    • If an invalid header name is given in brackets, the program will stop

Functions to write crosslink data as defined by a user-provided template.

croco.customTable.Write(xtable, outpath, customTemplatePath)[source]

writes an xtable data structure to file (in xtable format) based on a user-provided template file

Parameters:
  • xtable – data table structure
  • to write file (outpath) –
  • customTemplatePath – Path to template file defining the output structure

DynamXL

  • Write to: Directory in which to save the DynamXL file

Converts xTable data into cross-link information file for the dynamXL analysis software:

K189 NZ K192 NZ 18 K189 NZ K196 NZ 5 K200 NZ K192 NZ 1 K236 NZ K189 NZ 3

dynamxl.chem.ox.ac.uk

croco.DynamXL.Write(xtable, outpath)[source]

Convert xTable to DynamXL input file.

Parameters:
  • xtable – data table structure
  • outpath – path to write file

xiNET

  • Write to: Directory in which to save xiNet file
Functions to write data for the xiNET data
visualisation tool (http://crosslinkviewer.org)
croco.xiNET.Write(xtable, outpath)[source]

Convert xtable data structure to xiNET data file

Parameters:
  • xtable – data table structure
  • outpath – path to write file

pLabel

  • Write to: Directory in which to save the pLabel file
  • OptionsWindow: Directory containing the corresponding mgf-files - The mgf filenames must match the rawfile names given in the xTable
  • OptionsWindow: Merge mgf files will generate a new mgf-files containing only those spectra that were references in the xTable. It will adopt all paths in the pLabel files to match the location of the merged mgf-file.

Functions to write pLabel data.

croco.pLabel.Write(xtable, outpath, mgfDir, xlinker, mergepLabel=False)[source]

Converts xtable data structure to (multiple) input file(s) for the pLabel cross-link annotation tool

Parameters:
  • xtable – data table structure
  • outpath – path to write file (w/o file extension!)
  • xlinker – xlinker as given to pLabel
  • mergepLabel (bool) – Whether to generate a new MGF and single pLabel file