This function plots the positions of peptides with associated proteins from shotgun proteomics data from MaxQuant or Progenesis as input. The plots contain informations about: intensity, position, protein structure, location of protein domains, genename, protein accession, secretion score and truncation score. The plots are written to a PDF file
and a data.frame containing protein feature information is saved as a rds-file and csv-file.
Character string indicating the path of the global directory.
expname
Character string indicating the name of the directory where the files for this run are saved.
sourcefiles
Character string indicating the path to the peptides-file.
org
Character string specifying the organism the peptides are from.
grlocationdf
Data.frame including the following columns: Expname, Location, Treatment, Sample, Group.
version
Character string indicating what version of the ‘BasicData’ file should be used.
species
Character strings specifying the UniProt species names of the data sets for download from UniProt to ‘BasicData’.
proteomeid
Character strings specifying the UniProt proteome IDs of the organisms for download. Must be in the same order as species.
taxid
Character strings containing the UniProt taxonomic IDs of the organisms for download. Must be in the same order as species.
domain
Character strings containing the UniProt domain description. Must be in the same order as species.
forcedl
Logical, TRUE: indicates that the actual version of ‘BasicData’ should be downloaded again, FALSE: if not.
pepstack
Numerical indicating the minimal number of runs per group where the same peptide should have been measured.
pepque
Numerical indicating the minimal number of peptides that should have been measured in each groupe.
sortprint
Character string that indicates how the peptide plot will be sorted. "fcsmall": decreasing fcsmall values , "lflf": decreasing fclf values, "trunc": decreasing tscore values, "acc": increasing accessions.
unipep
Logical that indicates if only unique peptides should be used. TRUE: only uniques, FALSE: all peptides in the file.
localfasta
Character string indicating that a local FASTA file should be used. Default: "none", if the FASTA file should be downloaded from UniProt, "...": any valid path to a FASTA file on the system.
Details
Worklfow
1. Create a data structure.
2. Download and prepare data from UniProt.
3. Calculate features.
4. Print plots to PDF.
5. Save features as .rds and .csv.
Input
———————————————————
peptide-files: the program uses the file extension to decide if the input was created by MaxQuant (.txt) or by Progenesis (.csv).
grlocationdf: Should be a data.frame that contains the following columns:
Expname: This column should contain all experiment names from the peptide file that should be used for the feature plotting. Put each experiment in a single row. It should be a character string. Spaces will be filled with underscores automatically.
Location: Filled with "Secretome" or "Proteome" character strings that indicates if the experiment is from a lysate or not . Treatment: If the experiments are based on different treatments of the cell, should be marked here. The value must be a character string that matches [A-Z][A-Z]. Sample: Here should be marked from which sample each experiment is from. The values should be simple numbers of type numeric. Group: These values are used to set experiment groups for the secretome scores. They have to be numbers of type numeric. Set at least two groups if there are to different Locations (e.g. "Secretome" = 1 and "Proteome" = 2). Choose more groups if there are dependencies between treatment, sample and location.
grlocationdf is used to assign the experiments correctly during the different scoring and plotting functions.
Datastructure
At the beginning the following file-structure is created:
‘globalpath/BasicData’
‘globalpath/AnalysisData’
If it already exists, nothing new will be created and the old one is used.
In BasicData all the different versions of UniProt download files are stored.
In AnalysisData the output-files are stored.
UniProt
For annotation and protein sequence information the organisem specific gff-files and fasta-files are downloaded from UniProt database http://www.uniprot.org/. As default the actual data-sets are retrieved. If an already downloaded dataset should be used, set version to the foldername of the existing dataset. No archived version can be downloaded from UniProt.
Output
The PDF output file will contain a plot for every unique protein a peptide was identified by MaxQuant or Progenesis.
A data.frame containing values that are used for the score calculation will be at:
‘globpath/AnalysisData/expname/feature_table.rds’ and ‘globpath/AnalysisData/expname/feature_table.csv’
It contains the following columns: Accession, NTT, NTTcov, CTT, CTTcov, TotalPep, ProtL, MeanSec, MeanProt, MeanSecLF, MeanProtLF, tscore, fcsmall, fclf
A .csv-file of grlocationdf will be saved in ‘AnalysisData’, too.
Further more ‘intenscount_table.csv’ and ‘namesdf_table.csv’ are stored in the ‘AnalysisData’ directory. They
contain information that enables printing with print_selected_peptides.
Value
The return value is TRUE if no error occured and FALSE otherwise.
The plots and the feature table can be found in ‘globpath/AnalysisData/expname’.
Note
The download from UniProt may take a while, between 5 and 10 minutes per organism.
A detailed vignette will follow soon.