-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGGGGGG.Rmd
490 lines (381 loc) · 19.9 KB
/
GGGGGG.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
---
output: pdf_document
geometry: margin=1in
mainfont: Times New Roman
---
```{r,fig.width=7.5, fig.height=7.5,warning=F, message=F, echo=F,comment="K",results='asis'}
library(pander)
library(cegwas)
library(genetics)
library(ggplot2)
library(data.table)
library(grid)
library(stringr)
library(gridExtra)
library(knitr)
library(tidyr)
library(scales)
library(gtable)
library(dplyr)
panderOptions('knitr.auto.asis', TRUE)
plot_peak_ld <- function(plot_df, trait = NULL){
if (is.null(trait)) {
snp_df <- plot_df %>% na.omit()
}
else {
snp_df <- dplyr::filter(plot_df, trait == trait) %>%
na.omit()
}
ld_snps <- dplyr::filter(snps, CHROM %in% snp_df$CHROM, POS %in%
snp_df$POS)
ld_snps <- data.frame(snp_id = paste(ld_snps$CHROM, ld_snps$POS,
sep = "_"), data.frame(ld_snps)[, 5:ncol(ld_snps)])
sn <- list()
for (i in 1:nrow(ld_snps)) {
sn[[i]] <- genetics::genotype(as.character(gsub(1, "T/T",
gsub(-1, "A/A", ld_snps[i, 4:ncol(ld_snps)]))))
}
test <- data.frame(sn)
colnames(test) <- (ld_snps$snp_id)
if (ncol(test) == 1) {
print("Only one significant SNP, not calculating LD")
}
else {
ldcalc <- t(genetics::LD(test)[[3]])
diag(ldcalc) <- 1
LDs <- tbl_df(data.frame(ldcalc) %>%
dplyr::add_rownames(var = "SNP1")) %>%
tidyr::gather(SNP2, Dprime, -SNP1) %>%
dplyr::arrange(SNP1) %>%
tidyr::separate(SNP1, sep = "_", into = c("CHROM1", "POS1"), remove = F) %>%
dplyr::arrange(CHROM1, as.numeric(POS1))
ldplot <- ggplot2::ggplot(LDs)+
ggplot2::aes(x = factor(SNP1, levels = SNP1, ordered = T), y = factor(SNP2, levels = SNP1, ordered = T)) +
ggplot2::geom_tile(ggplot2::aes(fill = Dprime)) +
#ggplot2::geom_text(ggplot2::aes(label = signif(Dprime,3)), fontface = "bold", size = 12)+
ggplot2::theme(axis.text.x = ggplot2::element_text(size=16, face="bold", color="black"),
axis.text.y = ggplot2::element_text(size=16, face="bold", color="black"),
axis.title.x = ggplot2::element_text(size=0, face="bold", color="black", vjust=-.3),
axis.title.y = ggplot2::element_text(size=0, face="bold", color="black"),
legend.position="none") +
scale_x_discrete(labels = function(x) { gsub("_", ":", x)}, expand = c(0,0)) +
scale_y_discrete(labels = function(x) { gsub("_", ":", x)}, expand = c(0,0)) +
scale_fill_continuous(high = "#FF0000", low = "white", na.value = "white")
# ldplot <- cowplot::ggdraw(cowplot::switch_axis_position(ldplot, 'y'))
# rgb.palette <- grDevices::colorRampPalette(rev(c("blue",
# "orange", "red")), space = "rgb")
# ld_outs <- LDheatmap::LDheatmap(test, LDmeasure = "r",
# SNP.name = colnames(test), color = rgb.palette(18))
# LD.grob1 <- grid::editGrob(ld_outs$LDheatmapGrob, gPath("heatMap",
# "title"), gp = gpar(cex = 1.25, col = "black"))
# LD.grob2 <- grid::editGrob(LD.grob1, gPath("geneMap",
# "title"), gp = gpar(cex = 0, col = "orange"))
# LD.grob3 <- grid::editGrob(LD.grob2, gPath("Key", "title"),
# gp = gpar(cex = 1.25, col = "black"))
# grid::grid.newpage()
# grid::grid.draw(LD.grob3)
return(ldplot)
}
}
setwd("/Users/kristen/Documents/transposon_figure_data/data")
#load("Processed_Transposon_Mappings_2.Rda")
#load("Processed_Transposon_Mappings_SUBSET.Rda")
load("Processed_Transposon_Mappings_SUBSET2.Rda")
#load("position_QTL.Rda")
load("count_QTL.Rda")
pg<-read.table("paragraphs.txt",sep="\t",header=TRUE)
tf<-read.table("trait_filters.txt",sep="\t",header=FALSE)
colnames(tf)<-c("trait", "filters")
#test<-filter(processed_mapping_df,trait=="ZERO_new_TRANS_LINE2C_C")
#test<-filter(test,!is.na(peak_id))
# kexpand=function(){
# cat(knit(
# text=knit_expand(text=
# "<<yfig-{{cap}}-,fig.cap='{{cap}}',results='markup',echo=FALSE,fig.height={{figheight}},out.height={{outheight}}>>=\n
# .q\n
# @"
# )
# ))}
# .q=qplot(1:10);cap="first caption";figheight=9;outheight=90
# kexpand()
# make cure C and frac are not getting confused
#PxG function
hm<-processed_mapping_df
hm<-distinct(processed_mapping_df, trait,strain,peak_id)
hm$allele <- factor(hm$allele,
levels = c(-1,1),
labels = c("REF", "ALT"))
c<-filter(processed_mapping_df, log10p> BF)
#d<-filter(processed_mapping_df,peak_id=="2", trait=="absent_TRANS_CER1_C")
e<-filter(processed_mapping_df,!is.na(peak_id), trait=="absent_TRANS_CER1_C")
f<-distinct(e,POS,peak_id)
gwasPxG <- function(trt,specific_peak){
#load("~/Dropbox/AndersenLab/RCode/Stefan/good_gwasMappingsINlinkage_phenotypes.Rda")
hm %>%
filter(trait==trt,peak_id==specific_peak,!is.na(allele))%>%
ggplot(.)+
aes(x=allele,y = value,fill=as.factor(allele))+
geom_boxplot(outlier.shape=NA,size =.5,color="gray52")+
geom_point(size = 1, alpha = .8,position=position_jitter(w=.4, h=.025),na.rm=TRUE)+
#scale_fill_brewer(palette = "Set2")+
#geom_point(size = 1, alpha = .8,position=position_jitter(w=.4, h=.025),na.rm=TRUE)+
# geom_jitter(size = 3, alpha = .8,postion=position_jitter(0, 0)) +
theme_bw()+
theme(axis.text.x = element_text(size=9, , color="black"),
axis.text.y = element_text(size=9, color="black"),
axis.title.x = element_text(size=9, color="black"),
axis.title.y = element_text(size=9, color="black",vjust=1),
strip.text.x = element_text(size=9, color="black"),
strip.text.y = element_text(size=9, color="black"),
plot.title = element_text(size=9, vjust=1),
legend.title = element_text(size=9),
panel.border = element_rect(size=1, colour = "black"),
plot.margin = unit(c(.05,.05,.05,.05), "cm"),
legend.position = "none")+
scale_y_continuous(breaks= pretty_breaks())+
labs( x = "Genotype",y="Value")+
scale_fill_manual( values = c("darkgray", "burlywood2", "darkolivegreen","black"))
}
# pull unique combos, remove strain column(don't need specific strain info at this point)
#processed_mapping_df <- distinct(select(processed_mapping_df, -strain,-allele,-value))
processed_mapping_df<- processed_mapping_df %>% distinct(trait,marker,strain)
#create family and method columns
processed_mapping_df$family <- stringr::str_split_fixed(processed_mapping_df$trait, "_TRANS_",2)[,2]
processed_mapping_df$method <- stringr::str_split_fixed(processed_mapping_df$trait, "_TRANS_",2)[,1]
#read in position data and create family column
positions <- read.table("CtCp_all_nonredundant_reduced.txt")
names(positions)<-c("CHROM","start","end","TE","orientation","method","strain","class")
positions$family<- stringr::str_split_fixed(positions$TE, regex("_(non-)?reference"),2)[,1]
positions$family<- paste(stringr::str_split_fixed(positions$family, "_",4)[,3],stringr::str_split_fixed(positions$family, "_",4)[,4],sep="_")
positions$family <- gsub("_$" ,"",positions$family)
positions$family <- gsub("_non-reference(.*)$" ,"",positions$family)
#select traits above BF.....this step not needed, double checking everything is above BF
selection<-filter(processed_mapping_df, log10p > BF)
#extract the count base traits
base_traits <-selection[(selection$method=="absent"| selection$method=="new" |selection$method=="reference"|selection$method=="ZERO_new"|selection$method=="ONE_new"), ]
counts<-subset(base_traits, grepl("_C$", base_traits$family))
counts$family <- gsub("_C$" ,"",counts$family)
#
#
###REMOVE LATER!!!!!
#
#
processed_mapping_df <- distinct(dplyr::select(processed_mapping_df, -strain,-allele,-value))
processed_mapping_df<- processed_mapping_df %>% distinct(trait,marker)
#pull out only position traits from mappings dataframe
position_traits<-subset(selection,
grepl('^I', selection$trait) |
grepl('^V', selection$trait) |
grepl('^X', selection$trait))
#create family column
position_traits$family <- paste(stringr::str_split_fixed(position_traits$trait, "_",4)[,3],stringr::str_split_fixed(position_traits$trait, "_",4)[,4],sep="_")
position_traits$family <- gsub("_$" ,"",position_traits$family)
position_traits$family <- gsub("_non-reference(.*)$" ,"",position_traits$family)
# add position TRAIT_col family info to processed_mapping_df
processed_mapping_df<-processed_mapping_df %>%mutate(family = ifelse(processed_mapping_df$trait %in% position_traits$trait, (paste(stringr::str_split_fixed(processed_mapping_df$trait, "_",4)[,3],stringr::str_split_fixed(processed_mapping_df$trait, "_",4)[,4],sep="_")), processed_mapping_df$family))
#bind count and position traits option...choose oen of below three
#selection<-rbind(counts,position_traits)
selection<-counts
#selection<-position_traits
#
#strip count marker and remnant marks from dataframes
selection$trait <- gsub("_C$" ,"",selection$trait)
hm$trait <- gsub("_C$" ,"",hm$trait)
processed_mapping_df$trait <- gsub("_C$" ,"",processed_mapping_df$trait)
processed_mapping_df$family <- gsub("_C$" ,"",processed_mapping_df$family)
processed_mapping_df$family <- gsub("_$" ,"",processed_mapping_df$family)
processed_mapping_df$family <- gsub("_non-reference(.*)$" ,"",processed_mapping_df$family)
processed_mapping_df<-mutate(processed_mapping_df,ID=paste(trait,peak_id,sep="_"))
copy<-processed_mapping_df
processed_mapping_df<-mutate(processed_mapping_df,SNP_col=ifelse(ID %in% count_QTL$trait,"PASS","FAIL" ))
#unique(count_QTL$trait)
#unique(selection$trait)
#unique(processed_mapping_df$trait)
#### NEED TO FIX HERE
count_QTL<-mutate(count_QTL, trait2=gsub("_\\d+$","",trait))
#position_QTL<-mutate(position_QTL, trait2=gsub("_\\d+$","",trait))
selection <- filter(selection, (trait %in% count_QTL$trait2 ))
#unique(count_QTL$trait2)
#unique(position_QTL$trait2)
#unique(selection$trait)
processed_mapping_df<-filter(processed_mapping_df,CHROM != "MtDNA")
#selection$trait<-gsub("_non-reference_.*","",selection$trait)
#processed_mapping_df$trait<-gsub("_non-reference_.*","",processed_mapping_df$trait)
#load("reciprocal_removals.Rda")
#thing<-filter(selection,(trait %in% reciprocal_removals$TE))
#length(unique(thing$trait))
#unique(thing$trait)
#processed_mapping_df<-filter(processed_mapping_df,!(trait %in% reciprocal_removals$TE))
#selection<-filter(selection,!(trait %in% reciprocal_removals$TE))
class_subset<- positions %>% distinct(class,family) %>% dplyr::select(class,family)
selection <-merge(selection, class_subset, by="family")
#cat trait_names.txt |awk '{print $1"\t^*"}' >trait_filters.txt
processed_mapping_df<-left_join(processed_mapping_df,tf,by="trait")
selection<-arrange(selection,class,family,method)
label<-expression(bold(-log["10"](p)))
i="ONE_new_TRANS_MIRAGE1"
for (i in unique(selection$trait)){
specific_trait<- processed_mapping_df[processed_mapping_df$trait == i, ]
filters<-unique(specific_trait$filter)[0]
filters<-as.character(specific_trait[1,"filters"])
filters
empty <-specific_trait[specific_trait$method==NA,]
#specific_trait_mx <- max(specific_trait$log10p)
class_TE<-unique(filter(selection,trait==i)$class)
pvalues<-filter(specific_trait,log10p !="Inf") #
specific_trait_mx <- max(pvalues$log10p) #
TE<-specific_trait$family[1]
rect_data<-filter(specific_trait,SNP_col=="PASS")
plot_method<-unique(filter(selection,trait==i)$method)
plot_title<-gsub(".*_TRANS_","",i)
plot_title<-gsub("_CE$","",plot_title)
plot_title<-gsub("WBTransposon","WBT",plot_title)
#plot_title<-paste(plot_title,ifelse(plot_method=="ZERO_new","(ins)",ifelse(plot_method=="absent","(abs)",ifelse(plot_method=="ONE_new", "(ins)",ifelse(plot_method=="new", "(ins)", "(ref)")))),sep=" ")
plot_title<-paste(plot_title,ifelse(plot_method=="ZERO_new","(ZERO_ins)",ifelse(plot_method=="absent","(abs)",ifelse(plot_method=="ONE_new", "(ONE_ins)",ifelse(plot_method=="new", "(ins)", ifelse(plot_method=="ONE_new", "(ONE_ins)","(ref)"))))),sep="")
A<- processed_mapping_df %>%
filter(trait == i)%>%
.[order(.$peak_id,na.last=FALSE),]%>%
ggplot(.)+
aes(x=POS/1e6,y=log10p)+
geom_rect(data=rect_data,mapping=aes(xmin=startPOS/1e6, xmax=endPOS/1e6, ymin=0, ymax= Inf),fill="thistle1", alpha=1) +
geom_point(aes( color=ifelse(log10p> BF & SNP_col=="PASS", 'red', 'black')),size=1)+
facet_grid(.~CHROM,scale="free_x",space = "free_x")+scale_color_identity() +
#ggtitle(plot_title)+
ggtitle(bquote(.(plot_title)^{.(filters)}))+
geom_hline(aes(yintercept=BF),color="grey60",linetype="dashed")+
theme(strip.background = element_rect(fill = "white"),
strip.text.x = element_text(size = 9, colour = "black",face="bold"),
panel.background = element_rect(fill = "white"),
panel.border = element_rect(color="black", size=0.5, linetype="solid", fill=NA),
panel.margin = unit(.6, "lines"),
axis.ticks =element_line(colour = "black"),
axis.text.y = element_text(colour = "black"),
axis.text.x = element_text(colour = "black"),
axis.title=element_text(size=9,face="bold"),
plot.margin=unit(c(.1,.1,-.5,.1), "cm"),
plot.title = element_text(colour=ifelse(class_TE=="dnatransposon","navy",ifelse(class_TE=="retrotransposon","brown3","darkgoldenrod2"))),
legend.position=('none'))+
labs(x="",y=label)+
scale_y_continuous(expand=c(0,0),limits=c(0,specific_trait_mx+.075*specific_trait_mx),labels = function(x) format(x,width = 4),breaks= pretty_breaks())
A
# pull out X maxs of each panel
panel1<-filter(ggplot_build(A)$data[[2]],PANEL==1)
max1<-max(panel1$x)
min1<-(min(panel1$x))
panel2<-filter(ggplot_build(A)$data[[2]],PANEL==2)
max2<-(max(panel2$x))
min2<-(min(panel2$x))
panel3<-filter(ggplot_build(A)$data[[2]],PANEL==3)
max3<-(max(panel3$x))
min3<-(min(panel3$x))
panel4<-filter(ggplot_build(A)$data[[2]],PANEL==4)
max4<-(max(panel4$x))
min4<-(min(panel4$x))
panel5<-filter(ggplot_build(A)$data[[2]],PANEL==5)
max5<-(max(panel5$x))
min5<-(min(panel5$x))
panel6<-filter(ggplot_build(A)$data[[2]],PANEL==6)
max6<-(max(panel6$x))
min6<-(min(panel6$x))
positions$TRAIT_col<-paste(positions$method, "TRANS", positions$family, sep="_")
#traitPositions<-positions[positions$TRAIT_col==i,]
traitPositions<-positions[positions$family==TE,]
blank <- data.frame(CHROM=character(),
start=integer(),
end=integer(),
TE=character(),
orientation=character(),
method=character(),
strain=character(),
class=character(),
family=character(),
TRAIT_col=character(),
stringsAsFactors=FALSE)
blank[1,]<- c( "I", as.integer(10000000),as.integer(10000000),"blank","+","blank","fake","blank","blank","blank")
blank[2,]<- c( "II", as.integer(10000000),as.integer(10000000),"blank","+","blank","fake","blank","blank","blank")
blank[3,]<- c( "III", as.integer(10000000),as.integer(10000000),"blank","+","blank","fake","blank","blank","blank")
blank[4,]<- c( "IV", as.integer(10000000),as.integer(10000000),"blank","+","blank","fake","blank","blank","blank")
blank[5,]<- c( "V", as.integer(10000000),as.integer(10000000),"blank","+","blank","fake","blank","blank","blank")
blank[6,]<- c( "X", as.integer(10000000),as.integer(10000000),"blank","+","blank","fake","blank","blank","blank")
traitPositions<-rbind(traitPositions,blank)
traitPositions$start<-as.integer(traitPositions$start)
m <- ggplot(traitPositions, aes(x=start/1e6,fill=method))+scale_fill_manual(values = c('new' = "turquoise3", 'reference' = "slateblue1", 'absent' = "darkorange","blank"="black"))
m <-m + geom_histogram(data=subset(traitPositions,strain=="fake"), fill="white", colour="white", binwidth=.25)
m <-m + geom_histogram(data=subset(traitPositions,strain!="fake"), binwidth=.25)+
facet_grid(. ~ CHROM,scale="free",,space = "free_x",drop=FALSE)+
ggtitle("")+
geom_point(data = subset(traitPositions, CHROM=="I"),aes(x=max1,y=0),alpha=0)+
geom_point(data = subset(traitPositions, CHROM=="II"),aes(x=max2,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="III"),aes(x=max3,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="IV"),aes(x=max4,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="V"),aes(x=max5,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="X"),aes(x=max6,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="I"),aes(x=min1,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="II"),aes(x=min2,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="III"),aes(x=min3,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="IV"),aes(x=min4,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="V"),aes(x=min5,y=0),alpha=0) +
geom_point(data = subset(traitPositions, CHROM=="X"),aes(x=min6,y=0),alpha=0)+
labs(x = "Chromosome Position (Mb)", y="Number of Transposition Sites")+
theme(strip.background = element_blank(),
strip.text.x = element_blank(),
#strip.text = element_text(size = 9, colour = "black",face="bold"),
panel.margin = unit(.6, "lines"),
panel.border = element_rect(fill=NA,colour = "black"),
panel.background = element_rect(fill = "white"),
axis.ticks =element_line(colour = "black"),
axis.title=element_text(size=9),
axis.text.y = element_text(colour = "black",size=9),
axis.text.x = element_text(colour = "black",size=9),
legend.title=element_blank(),
# legend.position="bottom",
plot.margin=unit(c(-.5,.1,.1,.1), "cm"),
legend.position=('none'))
m
#now can check plot for max value and set y limit to a certain percent above that max value
m <- m + scale_y_continuous(expand = c(0,0),limits=c(0,max(ggplot_build(m)$panel$ranges[[1]]$y.range)*1.075),breaks= pretty_breaks())
g1<-ggplotGrob(A)
g2<-ggplotGrob(m)
#Bind the tables
g<-gtable:::rbind_gtable(g1, g2, "first")
panels <- g$layout$t[grep("panel", g$layout$name)]
g$heights[panels] <- lapply(c(8,8), unit, "null")
#grid.newpage()
# grid.draw(g)
df <- data.frame(1,2)
blank_plot<-ggplot(df,aes(x=1,y=1)) + geom_point(color="white") +
theme(axis.text =element_blank(),axis.ticks =element_blank(),axis.title =element_blank(),panel.background = element_blank(),panel.grid = element_blank())
plist<-vector()
for (p in rect_data$peak_id){
plist<-c(plist,p)
}
plist<-sort(plist)
box_list <- lapply(c(plist),FUN=function(x){gwasPxG(i,x)})
#plot(plot_grid(do.call("grid.arrange", c(box_list, ncol=length(plist))),blank_plot,ncol=1))
#DEV
sns <- dplyr::filter(specific_trait, aboveBF == 1 ,!is.na(peak_id))
sns <- dplyr::distinct(sns, peak_id)
if (nrow(sns)>1){
crs <- plot_peak_ld(sns)
} else {crs<-NULL} #single peak, no need to check for LD
ld<-ggplotGrob(crs)
#?gtable
grid.draw(grid.arrange(g,do.call("grid.arrange", c(box_list, ncol=length(plist))),heights=c(.50,.25,.25)))
#grid.draw(grid.arrange(g,do.call("grid.arrange", c(box_list, ncol=length(plist))),heights=c(.70,.30)))
#medians<-filter(Amedian_df,trait==i)
# median_diff<-medians$median_diff
#diff<-medians$diff
#print(median_diff)
#print(diff)
#TE_info<-filter(pg,trait==i)
#TE_info<-select(TE_info,info)
# TE_info<-TE_info[1,]
#TE_info<-toString(TE_info)
#panderOptions('knitr.auto.asis',FALSE)
#pandoc.header()
##n<-pandoc.header(TE_info)
#pandoc.p(TE_info)
cat("\n\n\\pagebreak\n")
}
#pandoc.header("UUUUU")
```