Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

petrosius2023_AstralAML update #25

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,7 @@
##'
"petrosius2023_mES"

####---- petrosius2023_AML ----####
####---- petrosius2023_AstralAML ----####

##' Petrosius et al. 2023 (bioRxiv): AML hierarchy on Astral.
##'
Expand All @@ -2734,7 +2734,7 @@
##' - `proteins`: Protein data from the Spectronaut PGQuant file with
##' LFQ quantities from the PG.Quantity column.
##'
##' The `colData(petrosius2023_AML())` contains cell type annotation, batch
##' The `colData(petrosius2023_AstralAML())` contains cell type annotation, batch
##' annotation and FACS data. The description of the `rowData` fields
##' can be found in the [`Spectronaut` user manual](https://biognosys.com/content/uploads/2023/03/Spectronaut-17_UserManual.pdf).
##'
Expand Down Expand Up @@ -2826,9 +2826,9 @@
##'
##' @examples
##' \donttest{
##' petrosius2023_AML()
##' petrosius2023_AstralAML()
##' }
##'
##' @keywords datasets
##'
"petrosius2023_AML"
"petrosius2023_AstralAML"
2 changes: 1 addition & 1 deletion inst/extdata/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"khan2023","Single-cell proteomics data of 421 MCF-10A cells undergoing EMT triggered by TGFβ","3.19",NA,"TXT","https://drive.google.com/drive/folders/1zCsRKWNQuAz5msxx0DfjDrIe6pUjqQmj",NA,"Homo sapiens",9606,TRUE,"MassIVE","Enes Sefa Ayar <[email protected]>","QFeatures","Rda","scpdata/khan2023.Rda",2023-12-21,47,"MaxQuant","TMTPro 16plex",TRUE,TRUE,TRUE,TRUE,NA
"guise2024","Single-cell proteomics data of 108 postmortem CTL or ALS spinal moto neurons","3.19",NA,"TXT","ftp://massive.ucsd.edu/v05/MSV000092119/",NA,"Homo sapiens",9606,TRUE,"MassIVE","Christophe Vanderaa <[email protected]>","QFeatures","Rda","scpdata/guise2024.rda",2024-01-05,47,"Proteome Discoverer","LFQ",TRUE,TRUE,TRUE,TRUE,NA
"petrosius2023_mES","Mouse embryonic stem cells across ground-state (m2i) and differentiation-permissive (m15) culture conditions.","3.19",NA,"TXT","https://dataverse.uclouvain.be/dataset.xhtml?persistentId=doi:10.14428/DVN/EMAVLT",NA,"Homo sapiens",9606,TRUE,"Dataverse","Enes Sefa Ayar <[email protected]>","QFeatures","Rda","scpdata/petrosius2023_mES.Rda",2024-04-09,605,"Spectronaut","LFQ",TRUE,TRUE,TRUE,TRUE,NA
"petrosius2023_AML","Single-cell proteomics data of 4 cell types from the OCI-AML8227 model.","3.19",NA,"TXT","https://dataverse.uclouvain.be/dataset.xhtml?persistentId=doi:10.14428/DVN/4DSPJM",NA,"Homo sapiens",9606,TRUE,"Dataverse","Samuel Gregoire <[email protected]>","QFeatures","Rda","scpdata/petrosius2023.Rda",2023-06-08,217,"Spectronaut","LFQ",TRUE,TRUE,TRUE,TRUE,NA
"petrosius2023_AstralAML","Single-cell proteomics data of 4 cell types from the OCI-AML8227 model.","3.19",NA,"TXT","https://dataverse.uclouvain.be/dataset.xhtml?persistentId=doi:10.14428/DVN/4DSPJM",NA,"Homo sapiens",9606,TRUE,"Dataverse","Samuel Gregoire <[email protected]>","QFeatures","Rda","scpdata/petrosius2023_AstralAML.Rda",2023-06-08,217,"Spectronaut","LFQ",TRUE,TRUE,TRUE,TRUE,NA
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
library(SingleCellExperiment)
library(scp)
library(tidyverse)
dataDir <- "~/isilon/DataSets/SCPCBIO/SNEcomb_sc8227_ASTRAL/"
dataDir <- "https://dataverse.uclouvain.be/api/access/datafile/"

####---- Create sample annotation ----####

## Retrieve annotation files
facs <- read.csv(paste0(dataDir, "index_map.csv"))
map <- read.csv(paste0(dataDir, "msRuns_overview.csv"), row.names = "X")
## index_map.tab file
facs <- read.delim(url(paste0(dataDir, "24337")))
## msRuns_overview.csv file
map <- read.csv(url(paste0(dataDir, "24339")), row.names = "X")

## Map FACS data with MS runs
facs_mapped <- inner_join(map, facs, by = "Well")
Expand All @@ -33,15 +35,16 @@ colnames(meta) <- gsub("_$" , "", gsub("\\.+", "_", colnames(meta)))
## spectronaut

## Retrieve ID/quant file
## '20240201_130747_PEPQuant (Normal).tsv' file
psm <-
read.delim(paste0(dataDir, "20240201_130747_PEPQuant (Normal).tsv"))
read.delim(paste0(dataDir, "24335"))

psm$fileID <- sub(".*sc8227_" , "", psm$R.FileName)

colnames(psm)[colnames(psm) == "FG.MS1Quantity"] <- "quant"

## QFeatures object
petrosius2023_AML <-
petrosius2023_AstralAML <-
readSCP(featureData = psm,
colData = meta,
batchCol = "fileID",
Expand All @@ -52,29 +55,29 @@ petrosius2023_AML <-

## Peptide data is generated by aggregation of the psm data

petrosius2023_AML <-
aggregateFeatures(petrosius2023_AML,
i = 1:length(petrosius2023_AML),
petrosius2023_AstralAML <-
aggregateFeatures(petrosius2023_AstralAML,
i = 1:length(petrosius2023_AstralAML),
fcol = "PEP.StrippedSequence",
fun = colMedians,
name = paste0("peptide_", names(petrosius2023_AML)))
name = paste0("peptide_", names(petrosius2023_AstralAML)))

petrosius2023_AML <-
joinAssays(petrosius2023_AML,
i = grep("peptide", names(petrosius2023_AML)),
petrosius2023_AstralAML <-
joinAssays(petrosius2023_AstralAML,
i = grep("peptide", names(petrosius2023_AstralAML)),
name = "peptides")

petrosius2023_AML <-
petrosius2023_AML[, , !grepl("peptide_", names(petrosius2023_AML))]
petrosius2023_AstralAML <-
petrosius2023_AstralAML[, , !grepl("peptide_", names(petrosius2023_AstralAML))]


####---- Retrieve protein data ----####

## Protein data has been shared by the authors in a PGQuant file from
## spectronaut

## 20240201_130747_PGQuant (Normal).tsv file
prot <-
read.delim(paste0(dataDir, "20240201_130747_PGQuant (Normal).tsv"))
read.delim(paste0(dataDir, "24334"))

prot$R.FileName <- sub(".*Bremen/" , "", prot$R.Raw.File.Name)
prot$R.FileName <- sub(".raw" , "", prot$R.FileName)
Expand All @@ -97,21 +100,21 @@ prot_assay <-
colnames(prot))],
fnames = "PG.ProteinAccessions")

## Add assay to petrosius2023_AML object
petrosius2023_AML <-
addAssay(petrosius2023_AML,
## Add assay to petrosius2023_AstralAML object
petrosius2023_AstralAML <-
addAssay(petrosius2023_AstralAML,
prot_assay,
name = "proteins")

## Add link from peptide data to protein data
petrosius2023_AML <- addAssayLink(petrosius2023_AML,
petrosius2023_AstralAML <- addAssayLink(petrosius2023_AstralAML,
from = "peptides",
to = "proteins",
varFrom = "PG.ProteinAccessions",
varTo = "PG.ProteinAccessions")

# Save data as Rda file
save(petrosius2023_AML,
file = "~/2022-phd-samuel-gregoire/petrosius2023_AML.Rda",
save(petrosius2023_AstralAML,
file = "~/2022-phd-samuel-gregoire/petrosius2023_AstralAML.Rda",
compress = "xz",
compression_level = 9)
4 changes: 2 additions & 2 deletions inst/scripts/make-metadata.R
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ meta <- list(
Notes = NA_character_
),
data.frame(
Title = "petrosius2023_AML",
Title = "petrosius2023_AstralAML",
Description = paste0("Single-cell proteomics data ",
"of 4 cell types from the OCI-AML8227 ",
"model."),
Expand All @@ -701,7 +701,7 @@ meta <- list(
Maintainer = "Samuel Gregoire <[email protected]>",
RDataClass = "QFeatures",
DispatchClass = "Rda",
RDataPath = "scpdata/petrosius2023.Rda",
RDataPath = "scpdata/petrosius2023_AstralAML.Rda",
PublicationDate = as.Date("2023/06/08"),
NumberAssays = 217,
PreprocessingSoftware = "Spectronaut",
Expand Down
Loading