thelovelab / fishpond

Differential expression and allelic analysis, nonparametric statistics
https://thelovelab.github.io/fishpond
27 stars 9 forks source link

Error in infRepError(infRepIdx) : there are no inferential replicates in the assays of 'y' #4

Closed sunliang3361 closed 4 years ago

sunliang3361 commented 4 years ago

Hi Mike, Can you give some hints for my error message?

coldata <- read.csv(file.path(dir, "coldata_mark.csv")) coldata sample condition type 1 A1 adequate Female 2 A2 adequate Female 3 A3 adequate Female 4 D1 deficient Female 5 D2 deficient Female 6 D3 deficient Female 7 MA1 adequate Male 8 MA2 adequate Male 9 MA3 adequate Male 10 MD1 deficient Male 11 MD2 deficient Male 12 MD3 deficient Male names(coldata) [1] "sample" "condition" "type"

names(coldata) <- c("names","condition","type")

coldata$files <- file.path(dir, "quants_mus", coldata$names, "quant.sf") all(file.exists(coldata$files)) [1] TRUE suppressPackageStartupMessages(library(SummarizedExperiment)) se <- tximeta(coldata) importing quantifications reading in files with read.delim (install 'readr' package for speed up) 1 2 3 4 5 6 7 8 9 10 11 12 found matching transcriptome: [ GENCODE - Mus musculus - release M24 ] building TxDb with 'GenomicFeatures' package Import genomic features from the file as a GRanges object ... trying URL 'ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_mouse/release_M24/gencode.vM24.annotation.gtf.gz' Content type 'unknown' length 28499422 bytes (27.2 MB)

OK Prepare the 'metadata' data frame ... OK Make the TxDb object ... OK generating transcript ranges fetching genome info for GENCODE Warning message: In .get_cds_IDX(mcols0$type, mcols0$phase) : The "phase" metadata column contains non-NA values for features of type stop_codon. This information was ignored. assayNames(se) [1] "counts" "abundance" "length"
head(rownames(se)) [1] "ENSMUST00000193812.1" "ENSMUST00000082908.1" "ENSMUST00000162897.1" "ENSMUST00000159265.1" "ENSMUST00000070533.4" [6] "ENSMUST00000192857.1"

female samples

y <- se

y <- y[,y$condition %in% c("naive","IFNg")]

y <-y[,y$type %in% c("Female")] y class: RangedSummarizedExperiment dim: 140948 6 metadata(6): tximetaInfo quantInfo ... txomeInfo txdbInfo assays(3): counts abundance length rownames(140948): ENSMUST00000193812.1 ENSMUST00000082908.1 ... ENSMUST00000082422.1 ENSMUST00000082423.1 rowData names(3): tx_id gene_id tx_name colnames(6): A1 A2 ... D2 D3 colData names(3): names condition type y$condition [1] "adequate" "adequate" "adequate" "deficient" "deficient" "deficient" y$type [1] "Female" "Female" "Female" "Female" "Female" "Female" y <- scaleInfReps(y) Error in infRepError(infRepIdx) : there are no inferential replicates in the assays of 'y'

mikelove commented 4 years ago

Can you post here instead:

https://support.bioconductor.org

Also, first read over the fishpond vignette section about generating inferential replicates.

See this section:

Importantly, --numGibbsSamples 20 was used to generate 20 inferential replicates with Salmon’s Gibbs sampling procedure.

https://bioconductor.org/packages/release/bioc/vignettes/fishpond/inst/doc/swish.html#macrophage_stimulation_experiment