Skip to content

Commit

Permalink
v2 correction bis
Browse files Browse the repository at this point in the history
  • Loading branch information
thibautlavole committed May 21, 2021
1 parent c3d2241 commit a846ce8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions SPiPv2.0_main.r
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit a846ce8

Please # to comment.