Ns126:Calendar/NOTES/2015-4-21: Difference between revisions

From ZhangLabWiki
Jump to navigation Jump to search
>Shicheng
No edit summary
>Shicheng
No edit summary
Line 67: Line 67:
  cd /home/sguo/monod/data/coad/DNA_Methylation/JHU_USC__HumanMethylation450/Level_3
  cd /home/sguo/monod/data/coad/DNA_Methylation/JHU_USC__HumanMethylation450/Level_3


 
library("stringr")
 
cancer<-"COAD"
 
pattern=paste("jhu-usc.edu_",cancer,".*",sep="")
  library("stringr")
print (pattern)
  cancer<-"COAD"
file=list.files(pattern=pattern)
  pattern=paste("jhu-usc.edu_",cancer,".*",sep="")
idv<-unique(as.array(str_extract(file,"TCGA-[0-9|a-z|A-Z]*-[0-9|a-z|A-Z]*")))
  print (pattern)
pairidv<-c()
  file=list.files(pattern=pattern)
for (i in 1:length(idv)){
  idv<-unique(as.array(str_extract(file,"TCGA-[0-9|a-z|A-Z]*-[0-9|a-z|A-Z]*")))
  t1<-paste(idv[i],"-01",sep="")  
  pairidv<-c()
  t2<-paste(idv[i],"-11",sep="")
  for (i in 1:length(idv)){
  if(all(any(grepl(t1,file)),any(grepl(t2,file)))){
    t1<-paste(idv[i],"-01",sep="")  
    pairidv<-c(pairidv,t1,t2)
    t2<-paste(idv[i],"-11",sep="")
  }
    if(all(any(grepl(t1,file)),any(grepl(t2,file)))){
}
      pairidv<-c(pairidv,t1,t2)
    }
  }

Revision as of 21:47, 21 April 2015


  • Now, I do know how to insert figures, but I don't know how to insert tables into MediaWiki. Therefore, I write a small code to transfer routine table to wikitable.
  • I must say: mediawiki is really a excellent tool to manage the lab and monitor the progress or task to help us complete the project quickly.
perl table2wikitable.pl input.table.txt
#!/usr/bin/perl
#table2wikitable.pl
use strict;
use Cwd;
chdir getcwd;

my $input=@ARGV[0];

open F,$input;
print "{| class=\"wikitable\" style=\"text-align: right; color: red;\"\n";
while(<F>){
chomp;
my @line=split /\t/;
my $tmp=join("||",@line);
print "| $tmp\n|-\n";
}
print"|}\n";
 


  • corresponding table is as the following. Pan-Cancer Methylation 450K dataset were collected from TCGA Project to identify optional padloc regions.
Symbol Case Control Cancer 肿瘤名称
KIRC 160 160 Kidney renal clear cell carcinoma 肾透明细胞癌
BRCA 92 92 Breast invasive carcinoma 浸润性乳腺癌
THCA 56 56 Thyroid carcinoma 甲状腺癌
HNSC 50 50 Head and Neck squamous cell carcinoma 头颈部鳞状细胞癌
PRAD 49 49 Prostate adenocarcinoma 前列腺癌
LIHC 49 49 Liver hepatocellular carcinoma 肝癌
KIRP 45 45 Kidney renal papillary cell carcinoma 肾乳头状细胞癌
LUSC 41 41 Lung squamous cell carcinoma 肺腺癌
COAD 39 39 Colon adenocarcinoma 结肠癌
UCEC 30 30 Uterine Corpus Endometrial carcinoma 子宫内膜癌
LUAD 26 26 Lung adenocarcinoma 肺鳞癌
  • In order to publish MONOD paper to a good paper quickly. 1) fast 2) large data
    • collect methylation 450 data of cancer tissues and normals from TCGA Project
      • sample size
      • clinical information: gender, age


tar xvf 08177614-f305-4fbf-84ca-fd2fbfe26755.tar   #
tar xvf 548dd1cf-84a1-4d96-86f0-b47d6300daa6.tar   #
tar xvf 9cd95b1c-782c-478d-9ec9-de7c9c441cc4.tar   #
tar xvf c5da6cd3-0266-4ebb-bd11-713ffe9b5ef9.tar   #
cd /home/sguo/monod/data/coad/DNA_Methylation/JHU_USC__HumanMethylation450/Level_3
library("stringr")
cancer<-"COAD"
pattern=paste("jhu-usc.edu_",cancer,".*",sep="")
print (pattern)
file=list.files(pattern=pattern)
idv<-unique(as.array(str_extract(file,"TCGA-[0-9|a-z|A-Z]*-[0-9|a-z|A-Z]*")))
pairidv<-c()
for (i in 1:length(idv)){
  t1<-paste(idv[i],"-01",sep="") 
  t2<-paste(idv[i],"-11",sep="")
  if(all(any(grepl(t1,file)),any(grepl(t2,file)))){
    pairidv<-c(pairidv,t1,t2)
  }
}