Last data update: 2014.03.03

R: Gene Plot
plot_genesR Documentation

Gene Plot

Description

Plot the observed SNP p-values for each gene

Usage

plot_genes(obs.outfile, gene.list, op=NULL)

Arguments

obs.outfile

The output file of observed p-values from runPermutations

gene.list

See gene.list

op

List of options. See details.

Details

If the option gene.list$chrm.var is not specified, then it is assumed that all the SNPs are on the same chromosome, and the same color will be used in the plot. If gene.list$chrm.var is specified, then the genes will be grouped by chromosome with the same color for the group.

Options list:
Below are the names for the options list op.

  • cex.axis See par

  • colors Colors to use for each gene in the plot

  • maxLabelLen Maximum length of x-axis labels

  • chr.text See par

  • x.las See par

  • x.padj See par

Value

A data frame containing the SNP ids, parameter estimates, genes, etc.

See Also

runPermutations

Examples

 # Get the file of observed p-values
 obs_file <- system.file("sampleData", "obs_pvalues.txt", package="ARTP")

 # Define the gene-SNP list
 gs_file <- system.file("sampleData", "gene_SNP_data.txt", package="ARTP") 
 gene.list <- list(file=gs_file, delimiter="\t", header=1, 
                   snp.var="SNP", gene.var="Gene")
 
 plot_genes(obs_file, gene.list) 
  

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(ARTP)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/ARTP/plot_genes.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot_genes
> ### Title: Gene Plot
> ### Aliases: plot_genes
> ### Keywords: misc
> 
> ### ** Examples
> 
>  # Get the file of observed p-values
>  obs_file <- system.file("sampleData", "obs_pvalues.txt", package="ARTP")
> 
>  # Define the gene-SNP list
>  gs_file <- system.file("sampleData", "gene_SNP_data.txt", package="ARTP") 
>  gene.list <- list(file=gs_file, delimiter="\t", header=1, 
+                    snp.var="SNP", gene.var="Gene")
>  
>  plot_genes(obs_file, gene.list) 
Read 50 items
Read 50 items
Read 50 items
Read 50 items
Read 50 items
Read 1 item
        SNP      Pvalue Pvalue.flag                 Beta                SE
1  rs111546  0.09693691           0   -0.179885542868972 0.108372071990276
2  rs679512   0.6959555           0   0.0424054621059663 0.108513279339869
3  rs601084   0.2376595           0    0.130574112501498 0.110575713543273
4  rs711504   0.1424374           0   -0.157562376845515 0.107420998765337
5  rs677636   0.6163505           0  -0.0564105950922082 0.112589422964676
6  rs776914   0.0618205           0    0.206241603441257 0.110432481773471
7  rs707881    0.343469           0     0.10490973280384 0.110742174457283
8  rs045071   0.5166842           0   0.0733082063091525 0.113048816792798
9  rs023502   0.3054294           0   -0.115258866373855 0.112463060534928
10 rs350111   0.5981452           0   0.0587057581775082 0.111381395975208
11 rs943580   0.8260588           0  -0.0240753369637776 0.109553323055287
12 rs710834   0.2465002           0   -0.126787477407513 0.109404053331235
13 rs873041   0.8555399           0   0.0204846038026022 0.112519050214399
14 rs907292   0.5165383           0  -0.0719122341169303  0.11085750492301
15 rs869720 0.002133421           0   -0.343052931886046 0.111707185375106
16 rs845434   0.3518095           0   -0.102501533049523 0.110088242931839
17 rs970602  0.03126954           0    0.245310568892198 0.113905852198469
18 rs467442   0.6382245           0   0.0513930178081695  0.10930434721052
19 rs568502   0.3567487           0   0.0992820704477744  0.10773049835635
20 rs789349   0.2417197           0   -0.129713738635107  0.11080021528614
21 rs483698   0.9002325           0    0.013705287582751 0.109320728149567
22 rs257422   0.2385562           0   -0.129467719586668 0.109848422643348
23 rs304539   0.6014501           0  -0.0583726872871319 0.111757350138933
24 rs540465   0.5075491           0  -0.0728492706016712 0.109934814664446
25 rs460053   0.0148385           0    0.269233494181084 0.110509307433127
26 rs090634    0.527107           0  -0.0694200174928294 0.109767402032607
27 rs902453   0.4280208           0   0.0887486738020001 0.111973983897237
28 rs556112 0.002111349           0   -0.341155990695376 0.110977326806018
29 rs651810   0.9602076           0 -0.00541145406641567 0.108461020249305
30 rs081827   0.3463527           0   -0.102177323381279 0.108504511242214
31 rs657122   0.7304196           0   0.0383139666478865 0.111194396224046
32 rs523523   0.4405566           0  -0.0835555004735847 0.108337242456089
33 rs247716   0.5769716           0   0.0639152657523113 0.114581736784783
34 rs732255  0.03917095           0    -0.23185238226432 0.112419461242631
35 rs013720   0.8195503           0  -0.0250624730402308 0.109863640775804
36 rs274103   0.6024686           0   0.0579641641631473 0.111286829723024
37 rs693822   0.1791079           0   -0.149147566803175 0.111013633078906
38 rs269238   0.3135151           0    0.108501520357496  0.10765388970792
39 rs115265   0.8596696           0   0.0192417111356911  0.10883645061282
40 rs254030   0.6953693           0   0.0419884503940435  0.10722854597832
41 rs683489   0.7243595           0   -0.038118149549605 0.108094152723342
42 rs262589   0.7752592           0  -0.0306663897601796 0.107411972360338
43 rs975021   0.7418598           0   0.0354946602720176 0.107758286677054
44 rs342947  0.01052636           0    0.288454434916937 0.112763786575373
45 rs265436   0.7589576           0  -0.0335118914181365 0.109212649205729
46 rs817723    0.625559           0   0.0534721806133871 0.109577033423779
47 rs859372   0.4186917           0   0.0903124577502524 0.111677036714732
48 rs014342   0.1049309           0    0.176453459052182 0.108827518684439
49 rs620579   0.3089676           0   -0.111854851817797  0.10994285984358
50 rs711571   0.4376787           0   0.0867483836075134 0.111771997410273
          OR               CI   Gene
1  0.8353658 (0.6755, 1.0331) Gene_4
2  1.0433174 (0.8434, 1.2906) Gene_4
3  1.1394824 (0.9175, 1.4152) Gene_1
4  0.8542235  (0.692, 1.0544) Gene_2
5  0.9451510  (0.758, 1.1785) Gene_2
6  1.2290501 (0.9898, 1.5261) Gene_2
7  1.1106104 (0.8939, 1.3798) Gene_4
8  1.0760621  (0.8622, 1.343) Gene_3
9  0.8911354 (0.7148, 1.1109) Gene_3
10 1.0604632 (0.8525, 1.3192) Gene_3
11 0.9762122   (0.7876, 1.21) Gene_3
12 0.8809209 (0.7109, 1.0916) Gene_1
13 1.0206959 (0.8187, 1.2725) Gene_1
14 0.9306126 (0.7489, 1.1565) Gene_3
15 0.7096007 (0.5701, 0.8833) Gene_4
16 0.9025768 (0.7274, 1.1199) Gene_3
17 1.2780182 (1.0223, 1.5977) Gene_4
18 1.0527366 (0.8497, 1.3043) Gene_3
19 1.1043778  (0.8942, 1.364) Gene_3
20 0.8783468 (0.7069, 1.0914) Gene_4
21 1.0137996 (0.8183, 1.2561) Gene_1
22 0.8785629 (0.7084, 1.0896) Gene_2
23 0.9432983 (0.7577, 1.1743) Gene_4
24 0.9297410 (0.7495, 1.1533) Gene_3
25 1.3089607  (1.054, 1.6255) Gene_1
26 0.9329347 (0.7523, 1.1569) Gene_4
27 1.0928060  (0.8775, 1.361) Gene_3
28 0.7109480  (0.572, 0.8837) Gene_1
29 0.9946032 (0.8041, 1.2302) Gene_1
30 0.9028694 (0.7299, 1.1168) Gene_3
31 1.0390574 (0.8356, 1.2921) Gene_3
32 0.9198400 (0.7439, 1.1374) Gene_4
33 1.0660021 (0.8516, 1.3344) Gene_3
34 0.7930632 (0.6362, 0.9886) Gene_4
35 0.9752490 (0.7863, 1.2096) Gene_2
36 1.0596770   (0.852, 1.318) Gene_3
37 0.8614420  (0.693, 1.0708) Gene_3
38 1.1146066 (0.9026, 1.3764) Gene_1
39 1.0194280 (0.8236, 1.2618) Gene_4
40 1.0428824 (0.8452, 1.2868) Gene_1
41 0.9625992 (0.7788, 1.1898) Gene_3
42 0.9697991 (0.7857, 1.1971) Gene_2
43 1.0361321 (0.8389, 1.2798) Gene_2
44 1.3343635 (1.0698, 1.6644) Gene_2
45 0.9670434 (0.7807, 1.1979) Gene_4
46 1.0549276  (0.851, 1.3077) Gene_2
47 1.0945162 (0.8793, 1.3623) Gene_2
48 1.1929789 (0.9638, 1.4766) Gene_2
49 0.8941740 (0.7208, 1.1092) Gene_2
50 1.0906222 (0.8761, 1.3577) Gene_3
>   
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>