Input File Format
Our algorithm is really powerful. However, it still has not possessed human intelligence yet. This unfortunately means that the input files need to conform with some certain format.
In this section, we will take a deep dive into the read_file
function
provided in the data_curation module of pMTnet_Omni_Document package.
File Format
Although the default format that read_file
expects is .csv, since
under the hood, we use the read_csv function from
the pandas package, read_file
accepts inputs of major file formats, as
long as the corresponding sep argument is supplied.
File Format |
sep |
---|---|
.csv |
|
.txt |
User defined. Usually |
.tsv |
|
Column Names
As methods of pMTnet Omni manipulates
the input dataframe based on its column names, harmonizing
column names is necessary. Therefore, when reading the user input,
read_file
will first attempt to find the following column names.
Note
Details on the data format will be explained in Data Format section.
Name |
Meaning |
Mandatory |
Note |
---|---|---|---|
va |
The name of the Alpha chain for the V segment |
No |
At least one of |
vaseq |
The actual sequence of amino acids of |
No |
At least one of |
vb |
The name of the Beta chain for the V segment |
No |
At least one of |
vbseq |
The actual sequence of amino acids of |
No |
At least one of |
cdr3a |
The sequence of amino acids for the CDR3 region on the Alpha chain |
Yes |
|
cdr3b |
The sequence of amino acids for the CDR3 region on the Beta chain |
Yes |
|
peptide |
The sequence of amino acids presented by the MHC |
Yes |
|
mhc |
The name(s) of the MHC |
No |
At least one of |
mhcseq |
The sequence(s) of amino acids of the corresponding |
No |
At least one of |
tcr_species |
Species of the TCR |
Yes |
|
pmhc_species |
Species for the peptide-MHC |
Yes |
|
If read_file
can not match these names exactly, it will try
modifying the found column names in the user input to match the names.
Specifically, it will change the names to lower cases, strip all white spaces,
and remove special characters like *, _, +, -
. See the following for some
acceptable input examples as well as some unacceptable input examples.
Input |
Acceptable |
---|---|
V_A seq |
Yes |
pMHC SPECIES |
Yes |
V Alpha |
No |
Epitope |
No |
Data Format
We understand that the nomenclatures are not always consistent in the field of biology. Albeit being conceptually viable, it would be too overwhelming for us to take all commonly-used naming conventions into consideration.
In this section, the required format for all fields in the user input will be elaborated upon.