Skip to content

Instantly share code, notes, and snippets.

@kozo2
Last active August 26, 2016 16:57
Show Gist options
  • Select an option

  • Save kozo2/a1ff8aa96c95f87bd64459f58876be9d to your computer and use it in GitHub Desktop.

Select an option

Save kozo2/a1ff8aa96c95f87bd64459f58876be9d to your computer and use it in GitHub Desktop.
MetaboAnalyst

variables

  • qvec = queryのcompoundのvector
  • lib.type = metabolite set の定義, pathwayなど

procedure

  • queryからcrossref tableの作成
  • filterをかけるかどうか == reference metabolome の変更をするかどうか?

data

  • resources/libs/msets に彼らのmset

R command history

InitDataObjects("conc", "msetora", FALSE)
Setup.MapData(tmp.vec);
CrossReferencing("name");
SetMetabolomeFilter(F);
SetCurrentMsetLib("pathway", 0, F);
CalculateHyperScore()
SaveTransformedData()

phyper 内訳

#enrich_stats.R 67から69行目
       # use lower.tail = F for P(X>x)                                                                                                                                                                                     
        # phyper("# of white balls drawn", "# of white balls in the urn", "# of black balls in the urn", "# of balls drawn")                                                                                                
                res.mat[i,4]<-phyper(hit.num[i]-1, set.num[i], uniq.count-set.num[i], q.size, lower.tail=F);
  • res.mat[i,4] i番目のpathwayグループに対するMSEAのpvalue
  • hit.num[i] i番目pathwayグループに含まれるinput(queryする)化合物の数
  • set.num[i] i番目pathwayグループの化合物の数
  • uniq.count 全pathwayグループ中の化合物の総数 # total uniq cmpds in the current mset lib
  • q.size input(queryする)化合物の総数
  • queryにuniq.count中に存在しない化合物を追加した場合はuniq.countは不変、q.sizeは増える
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment