Mercurial > repos > davidvanzessen > argalaxy_tools
changeset 41:a70dbcfa5d8a draft
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 06 Jul 2017 09:07:52 -0400 |
parents | 106275b54470 |
children | 9a47d7a552d6 |
files | report_clonality/RScript.r |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/report_clonality/RScript.r Tue May 30 07:26:33 2017 -0400 +++ b/report_clonality/RScript.r Thu Jul 06 09:07:52 2017 -0400 @@ -990,7 +990,7 @@ #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 = na.omit(clonaltype.in.replicates) +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 = ":")) @@ -1002,7 +1002,13 @@ 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) + 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) + names(clonaltype.counts) = c("clonaltype", "coincidence") clonaltype.counts = clonaltype.counts[clonaltype.counts$coincidence > 1,]