# HG changeset patch # User davidvanzessen # Date 1509026285 14400 # Node ID 2325074a8461561f3cf27c8fdbee0da95e3d661a # Parent 9a47d7a552d6e46ab0130e7a9390cafc65e334da Uploaded diff -r 9a47d7a552d6 -r 2325074a8461 report_clonality/RScript.r --- a/report_clonality/RScript.r Thu Oct 26 09:08:37 2017 -0400 +++ b/report_clonality/RScript.r Thu Oct 26 09:58:05 2017 -0400 @@ -988,39 +988,44 @@ median.aa.l = data.frame(data.table(PRODF)[, list(median=as.double(median(as.numeric(.SD$CDR3.Length, na.rm=T), na.rm=T))), by=c("Sample")]) write.table(median.aa.l, "AAMedianBySample.txt" , sep="\t",quote=F,na="-",row.names=F,col.names=F) - -#generate the "Sequences that are present in more than one replicate" dataset -clonaltype.in.replicates = inputdata -clonaltype.in.replicates = clonaltype.in.replicates[clonaltype.in.replicates$Functionality %in% c("productive (see comment)","productive"),] -clonaltype.in.replicates = clonaltype.in.replicates[!(is.na(clonaltype.in.replicates$ID) | is.na(clonaltype.in.replicates$Top.V.Gene) | is.na(clonaltype.in.replicates$Top.J.Gene)),] -clonaltype = unlist(strsplit(clonaltype, ",")) +if(clonaltype != "none"){ + #generate the "Sequences that are present in more than one replicate" dataset + clonaltype.in.replicates = inputdata + clonaltype.in.replicates = clonaltype.in.replicates[clonaltype.in.replicates$Functionality %in% c("productive (see comment)","productive"),] + clonaltype.in.replicates = clonaltype.in.replicates[!(is.na(clonaltype.in.replicates$ID) | is.na(clonaltype.in.replicates$Top.V.Gene) | is.na(clonaltype.in.replicates$Top.J.Gene)),] + clonaltype = unlist(strsplit(clonaltype, ",")) -clonaltype.in.replicates$clonaltype = do.call(paste, c(clonaltype.in.replicates[c(clonaltype, "Replicate")], sep = ":")) + clonaltype.in.replicates$clonaltype = do.call(paste, c(clonaltype.in.replicates[paste_columns], sep = ":")) -clonaltype.in.replicates = clonaltype.in.replicates[!duplicated(clonaltype.in.replicates$clonaltype),] + clonaltype.in.replicates = clonaltype.in.replicates[!duplicated(clonaltype.in.replicates$clonaltype),] -clonaltype = clonaltype[-which(clonaltype == "Sample")] + clonaltype = clonaltype[-which(clonaltype == "Sample")] -clonaltype.in.replicates$clonaltype = do.call(paste, c(clonaltype.in.replicates[clonaltype], sep = ":")) -clonaltype.in.replicates = clonaltype.in.replicates[,c("clonaltype","Replicate", "ID", "Sequence", "Sample")] + clonaltype.in.replicates$clonaltype = do.call(paste, c(clonaltype.in.replicates[clonaltype], sep = ":")) + clonaltype.in.replicates = clonaltype.in.replicates[,c("clonaltype","Replicate", "ID", "Sequence", "Sample")] -write.table(clonaltype.in.replicates, "clonaltypes_replicates_before_table.txt" , sep="\t",quote=F,na="-",row.names=F,col.names=T) + write.table(clonaltype.in.replicates, "clonaltypes_replicates_before_table.txt" , sep="\t",quote=F,na="-",row.names=F,col.names=T) -clonaltype.counts = data.frame(table(clonaltype.in.replicates$clonaltype)) + clonaltype.counts = data.frame(table(clonaltype.in.replicates$clonaltype)) -write.table(clonaltype.counts, "clonaltypes_counts.txt" , sep="\t",quote=F,na="-",row.names=F,col.names=T) + write.table(clonaltype.counts, "clonaltypes_counts.txt" , sep="\t",quote=F,na="-",row.names=F,col.names=T) -names(clonaltype.counts) = c("clonaltype", "coincidence") + names(clonaltype.counts) = c("clonaltype", "coincidence") -clonaltype.counts = clonaltype.counts[clonaltype.counts$coincidence > 1,] + clonaltype.counts = clonaltype.counts[clonaltype.counts$coincidence > 1,] -clonaltype.in.replicates = clonaltype.in.replicates[clonaltype.in.replicates$clonaltype %in% clonaltype.counts$clonaltype,] -clonaltype.in.replicates = merge(clonaltype.in.replicates, clonaltype.counts, by="clonaltype") -clonaltype.in.replicates = clonaltype.in.replicates[order(-clonaltype.in.replicates$coincidence, clonaltype.in.replicates$clonaltype, clonaltype.in.replicates$Replicate),c("coincidence","clonaltype", "Sample", "Replicate", "ID", "Sequence")] + clonaltype.in.replicates = clonaltype.in.replicates[clonaltype.in.replicates$clonaltype %in% clonaltype.counts$clonaltype,] + clonaltype.in.replicates = merge(clonaltype.in.replicates, clonaltype.counts, by="clonaltype") + clonaltype.in.replicates = clonaltype.in.replicates[order(-clonaltype.in.replicates$coincidence, clonaltype.in.replicates$clonaltype, clonaltype.in.replicates$Replicate),c("coincidence","clonaltype", "Sample", "Replicate", "ID", "Sequence")] -write.table(clonaltype.in.replicates, "clonaltypes_replicates.txt" , sep="\t",quote=F,na="-",row.names=F,col.names=T) + write.table(clonaltype.in.replicates, "clonaltypes_replicates.txt" , sep="\t",quote=F,na="-",row.names=F,col.names=T) +} else { + cat("No clonaltype", file="clonaltypes_replicates_before_table.txt") + cat("No clonaltype", file="clonaltypes_counts.txt") + cat("No clonaltype", file="clonaltypes_replicates.txt") +} diff -r 9a47d7a552d6 -r 2325074a8461 tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Thu Oct 26 09:58:05 2017 -0400 @@ -0,0 +1,36 @@ + + + + + + https://github.com/mikessh/higblast/releases/download/v0.6/igblastwrapper_linux64.tar.gz + + bin + $INSTALL_DIR/ + + + data + $INSTALL_DIR/ + + + igblastwrp.jar + $INSTALL_DIR/ + + + $INSTALL_DIR/ + + + + +Downloads https://github.com/mikessh/higblast/ + + + + + + +