From a846ce8f68ab4a475e71cc3a547f4aa34ded69f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?thibaut=20Lavol=C3=A9?= Date: Fri, 21 May 2021 10:04:45 +0000 Subject: [PATCH] v2 correction bis --- SPiPv2.0_main.r | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/SPiPv2.0_main.r b/SPiPv2.0_main.r index ff0a42c..1fac66a 100755 --- a/SPiPv2.0_main.r +++ b/SPiPv2.0_main.r @@ -377,6 +377,7 @@ if(fileFormat=="vcf"){ if(!is.null(data)){ # STEP 1 : deleting repetitions in the vcf storage colnames(VCFinfo_DF) <- columnsNames + VCFinfo_DF = unique(VCFinfo_DF) VCFinfo_toPrint <- unique(VCFinfo_text) # STEP 2 : update of the local_dataRefSeq @@ -417,8 +418,13 @@ if(fileFormat=="vcf"){ } if(printVCF){ spipResult = mapply(mergeSPiPresult,VCFinfo_toPrint) - - rawToprint = paste(VCFinfo_toPrint,spipResult,sep=";") + if(length(grep(".",VCFinfo_DF$INFO))>0){ + VCFinfo_DF$INFO[grep(".",VCFinfo_DF$INFO)] = spipResult[grep(".",VCFinfo_DF$INFO)] + VCFinfo_DF$INFO[-grep(".",VCFinfo_DF$INFO)] = paste(VCFinfo_DF$INFO[-grep(".",VCFinfo_DF$INFO)],spipResult[-grep(".",VCFinfo_DF$INFO)],sep=";") + }else{ + VCFinfo_DF$INFO = paste(VCFinfo_DF$INFO,spipResult,sep=";") + } + rawToprint = apply(VCFinfo_DF,1,paste0,collapse="\t") writeLines(rawToprint, con = output,sep="\n") }else{ rawResult = apply(data[,c("varID", "Interpretation", "InterConfident", "SPiPscore", "strand",