plotP from SPIA
0
0
Entering edit mode
4.3 years ago
bojkem91 • 0

Hi! I have a problem with plotP function from SPIA, it is constantly throwing me this error:

Error in text.default(-log(ph)[oks] + 0.7, -log(pb)[oks], labels = as.vector(x$ID)[oks],  : 
  zero-length 'labels' specified

This is my chunk of code for R markdown:

makeSPIAdata( 
  kgml.path = "kegg_data_1",
  organism = "hsa",
  out.path = "kegg_data_1"
)

# ENTREZIDs of DEGs
deg_entrezids2 <- res_dex_shrink2[deg_filter2, "ENTREZID"]
# Vector of LFCs of DEGs. Names are ENTREZIDs.
entrez_lfc_deg2 <- entrez_lfc2[deg_entrezids2]
entrez_lfc_deg2 <- entrez_lfc_deg2[order(entrez_lfc_deg2, decreasing = TRUE)]
head(entrez_lfc_deg2)

spia_results2 <- spia(
  de = entrez_lfc_deg2,
  all = res_dex_shrink2$ENTREZID,
  organism = "hsa",
  data.dir = "kegg_data_1/"
)
spia_results2

Two-evidence plot:
plotP(spia_results2, threshold = 0.63)


# Viewing data in KEGG ############################

pathview(
  # LFC to color pathway.
  gene.data = entrez_lfc_deg2,
  # We use top pathway by ES from GSEA.
  pathway.id = gsea_kegg_results2$ID[1],
  species = "hsa",
  # Coloring range <min LFC; max LFC>
  limit = list(gene = max(abs(entrez_lfc_deg2)), cpd = 1),
  kegg.dir = "kegg_data_1/"#kegg_data
)

And pathview is not executed.

RNA-Seq R • 653 views
ADD COMMENT

Login before adding your answer.

Traffic: 2541 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6