Skip to content

Commit 6447f89

Browse files
committed
Fix issue Excel files (new dependencies requirements)
1 parent 05436f2 commit 6447f89

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ shinyServer(function(input, output,session){
241241
if (input$datatype=="Excel"){
242242

243243
ff_list<-list()
244+
new_ff_list = list()
244245
for (w in 1:length(inFile$datapath)){
245246

246247
if (length(grep(".xlsx",inFile$datapath[w]))>0){
@@ -261,10 +262,12 @@ shinyServer(function(input, output,session){
261262
aux$FILTER<-"PASS"
262263
aux<-aux[,c("#CHROM","POS","ID","REF","ALT","QUAL","FILTER")]
263264
ff_list[[w]]<-tempfile("tp",fileext=".vcf")
265+
new_ff_list[[w]] = do.call("c",lapply(sapply(ff_list[[w]],strsplit,"[.]"),paste,collapse="_new."))
264266
write.table(aux,file=ff_list[[w]],row.names=F,quote=F,sep="\t")
267+
system(paste0('echo "##fileformat=VCFv4.2" | cat - ',ff_list[[w]],' > ',new_ff_list[[w]]))
265268
}
266269

267-
ff<-do.call("c",ff_list)
270+
ff<-do.call("c",new_ff_list)
268271

269272
return(read_vcfs_as_granges(ff,inFile$name,ref_genome(),group = "auto+sex", check_alleles = TRUE))
270273
}

0 commit comments

Comments
 (0)