Skip to content
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
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,13 @@ Collate:
'qtlEnrichmentPipeline.R'
'regularizedRegressionWrappers.R'
'relatednessQc.R'
'twasWeights.R'
'resultWriters.R'
'resultReaders.R'
'sldscPostprocessingPipeline.R'
'sldscWrapper.R'
'twasWeights.R'
'twasWeightsPipeline.R'
'twasWeightsRow.R'
'vcfWriter.R'
Depends:
R (>= 4.5)
LazyData: false
16 changes: 14 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export(bayesCWeights)
export(bayesLWeights)
export(bayesNWeights)
export(bayesRWeights)
export(blockId)
export(blockMetadata)
export(buildLdEigen)
export(buildLdScore)
Expand Down Expand Up @@ -210,6 +211,8 @@ export(ensembleWeights)
export(estCtwasGroupPriors)
export(estimateH2)
export(estimateSparsity)
export(exportToBed)
export(exportToVcf)
export(extractCsInfo)
export(extractTopPipInfo)
export(filterInvalidSummaryStat)
Expand All @@ -233,8 +236,10 @@ export(frqData)
export(fsusieAffectedRegions)
export(fsusieCredibleBand)
export(fsusieGetCs)
export(fsusieTraitEffects)
export(fsusieWeights)
export(fullFit)
export(genomicOrder)
export(genomicRegion)
export(genotypeCovariates)
export(genotypes)
Expand Down Expand Up @@ -343,10 +348,12 @@ export(qtlSumStatsFromZMatrix)
export(raiss)
export(readAfreq)
export(readAnnotations)
export(readFineMappingResult)
export(readGenotypes)
export(readSldscAnnot)
export(readSldscFrq)
export(readSldscTrait)
export(readTwasWeights)
export(refPanel)
export(refVariantInfo)
export(regionToDf)
Expand Down Expand Up @@ -409,7 +416,6 @@ export(variantInfo)
export(waldTestPval)
export(weightStandardized)
export(weightsDataType)
export(writeSumStatsVcf)
export(xvarCutoff)
export(z)
exportClasses(AnnotationMatrix)
Expand Down Expand Up @@ -486,6 +492,7 @@ exportMethods(as.data.frame)
exportMethods(as.list)
exportMethods(baselineAnnotations)
exportMethods(bindROWS)
exportMethods(blockId)
exportMethods(blockMetadata)
exportMethods(coef)
exportMethods(colnames)
Expand All @@ -507,11 +514,14 @@ exportMethods(cvResult)
exportMethods(eigenList)
exportMethods(endoapply)
exportMethods(estimateH2)
exportMethods(exportToBed)
exportMethods(exportToVcf)
exportMethods(fineMappingPipeline)
exportMethods(fineMappingResult)
exportMethods(frqData)
exportMethods(fsusieAffectedRegions)
exportMethods(fsusieCredibleBand)
exportMethods(fsusieTraitEffects)
exportMethods(fullFit)
exportMethods(genomicRegion)
exportMethods(genotypeCovariates)
Expand Down Expand Up @@ -590,7 +600,6 @@ exportMethods(variantInfo)
exportMethods(weightStandardized)
exportMethods(weights)
exportMethods(weightsDataType)
exportMethods(writeSumStatsVcf)
exportMethods(xvarCutoff)
exportMethods(z)
importClassesFrom(GenomicRanges,GRanges)
Expand Down Expand Up @@ -623,6 +632,7 @@ importFrom(GenomicRanges,
start
)
importFrom(IRanges,
CharacterList,
DataFrameList,
IRanges,
findOverlaps
Expand All @@ -632,7 +642,9 @@ importFrom(MultiAssayExperiment,longForm)
importFrom(Rsamtools,
TabixFile,
asBcf,
bgzip,
headerTabix,
indexTabix,
scanTabix,
seqnamesTabix
)
Expand Down
19 changes: 19 additions & 0 deletions R/AllClasses.R
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ setMethod("methodNames", "FineMappingResultBase", function(x) {
unique(as.character(x$method))
})


#' @noRd
setMethod(
"adjustPips",
Expand Down Expand Up @@ -1085,6 +1086,24 @@ setMethod("fsusieCredibleBand", "FineMappingResultBase", function(x) {
.fmrAggregateView(x, perEntry = .fmrRowFsusieCredibleBand)
})

#' @rdname fsusieTraitEffects
#' @export
setMethod("fsusieTraitEffects", "FineMappingResultBase", function(x) {
# Not .fmrAggregateView(): the per-entry payload carries only the fit, and
# this view also needs the row's `jointTraits` column for the trait names.
meta <- .fmrRowMetadata(x)
parts <- compact(map(
seq_len(nrow(x)),
.fsusieEntryTraitEffects,
x = x,
meta = meta
))
if (length(parts) == 0L) {
return(bind_cols(slice(meta, integer(0)), .emptyTraitEffects()))
}
.rbindAligned(parts)
})

#' @rdname fsusieAffectedRegions
#' @export
setMethod("fsusieAffectedRegions", "FineMappingResultBase", function(x) {
Expand Down
Loading
Loading