# HG changeset patch # User davidvanzessen # Date 1481117783 18000 # Node ID beaa487ecf43b184ea56eb973266c7f7caa4653e # Parent 4f8a1d121384b72341545dc1dbca46a67a3957b3 Uploaded diff -r 4f8a1d121384 -r beaa487ecf43 complete_immunerepertoire.xml --- a/complete_immunerepertoire.xml Mon Sep 05 11:15:22 2016 -0400 +++ b/complete_immunerepertoire.xml Wed Dec 07 08:36:23 2016 -0500 @@ -24,11 +24,11 @@ - - - - - + + + + + diff -r 4f8a1d121384 -r beaa487ecf43 report_clonality/RScript.r --- a/report_clonality/RScript.r Mon Sep 05 11:15:22 2016 -0400 +++ b/report_clonality/RScript.r Wed Dec 07 08:36:23 2016 -0500 @@ -10,7 +10,7 @@ library(ggplot2) if (!("plyr" %in% rownames(installed.packages()))) { install.packages("plyr", repos="http://cran.xl-mirror.nl/") -} +} library(plyr) if (!("data.table" %in% rownames(installed.packages()))) { @@ -717,7 +717,8 @@ DEL.JH=mean(.SD$X5J.REGION.trimmed.nt.nb, na.rm=T), Total.Del=mean(rowSums(.SD[,c("X3V.REGION.trimmed.nt.nb", "X5D.REGION.trimmed.nt.nb", "X3D.REGION.trimmed.nt.nb", "X5J.REGION.trimmed.nt.nb"), with=F], na.rm=T)), Total.N=mean(rowSums(.SD[,c("N.REGION.nt.nb", "N1.REGION.nt.nb", "N2.REGION.nt.nb", "N3.REGION.nt.nb", "N4.REGION.nt.nb"), with=F], na.rm=T)), - Total.P=mean(rowSums(.SD[,c("P3V.nt.nb", "P5D.nt.nb", "P3D.nt.nb", "P5J.nt.nb"), with=F], na.rm=T))), + Total.P=mean(rowSums(.SD[,c("P3V.nt.nb", "P5D.nt.nb", "P3D.nt.nb", "P5J.nt.nb"), with=F], na.rm=T)), + Median.CDR3.l=median(.SD$CDR3.Length.DNA)), by=c("Sample")]) newData[,sapply(newData, is.numeric)] = round(newData[,sapply(newData, is.numeric)],1) write.table(newData, "junctionAnalysisProd_mean.csv" , sep=",",quote=F,na="-",row.names=F,col.names=F) @@ -735,7 +736,8 @@ DEL.JH=num_median(.SD$X5J.REGION.trimmed.nt.nb, na.rm=T), Total.Del=num_median(rowSums(.SD[,c("X3V.REGION.trimmed.nt.nb", "X5D.REGION.trimmed.nt.nb", "X3D.REGION.trimmed.nt.nb", "X5J.REGION.trimmed.nt.nb"), with=F], na.rm=T)), Total.N=num_median(rowSums(.SD[,c("N.REGION.nt.nb", "N1.REGION.nt.nb", "N2.REGION.nt.nb", "N3.REGION.nt.nb", "N4.REGION.nt.nb"), with=F], na.rm=T)), - Total.P=num_median(rowSums(.SD[,c("P3V.nt.nb", "P5D.nt.nb", "P3D.nt.nb", "P5J.nt.nb"), with=F], na.rm=T))), + Total.P=num_median(rowSums(.SD[,c("P3V.nt.nb", "P5D.nt.nb", "P3D.nt.nb", "P5J.nt.nb"), with=F], na.rm=T)), + Median.CDR3.l=median(.SD$CDR3.Length.DNA)), by=c("Sample")]) newData[,sapply(newData, is.numeric)] = round(newData[,sapply(newData, is.numeric)],1) write.table(newData, "junctionAnalysisProd_median.csv" , sep=",",quote=F,na="-",row.names=F,col.names=F) @@ -753,7 +755,8 @@ DEL.JH=mean(.SD$X5J.REGION.trimmed.nt.nb, na.rm=T), Total.Del=mean(rowSums(.SD[,c("X3V.REGION.trimmed.nt.nb", "X5D.REGION.trimmed.nt.nb", "X3D.REGION.trimmed.nt.nb", "X5J.REGION.trimmed.nt.nb"), with=F], na.rm=T)), Total.N=mean(rowSums(.SD[,c("N.REGION.nt.nb", "N1.REGION.nt.nb", "N2.REGION.nt.nb", "N3.REGION.nt.nb", "N4.REGION.nt.nb"), with=F], na.rm=T)), - Total.P=mean(rowSums(.SD[,c("P3V.nt.nb", "P5D.nt.nb", "P3D.nt.nb", "P5J.nt.nb"), with=F], na.rm=T))), + Total.P=mean(rowSums(.SD[,c("P3V.nt.nb", "P5D.nt.nb", "P3D.nt.nb", "P5J.nt.nb"), with=F], na.rm=T)), + Median.CDR3.l=median(.SD$CDR3.Length.DNA)), by=c("Sample")]) newData[,sapply(newData, is.numeric)] = round(newData[,sapply(newData, is.numeric)],1) write.table(newData, "junctionAnalysisUnProd_mean.csv" , sep=",",quote=F,na="-",row.names=F,col.names=F) @@ -771,7 +774,8 @@ DEL.JH=num_median(.SD$X5J.REGION.trimmed.nt.nb, na.rm=T), Total.Del=num_median(rowSums(.SD[,c("X3V.REGION.trimmed.nt.nb", "X5D.REGION.trimmed.nt.nb", "X3D.REGION.trimmed.nt.nb", "X5J.REGION.trimmed.nt.nb"), with=F], na.rm=T)), Total.N=num_median(rowSums(.SD[,c("N.REGION.nt.nb", "N1.REGION.nt.nb", "N2.REGION.nt.nb", "N3.REGION.nt.nb", "N4.REGION.nt.nb"), with=F], na.rm=T)), - Total.P=num_median(rowSums(.SD[,c("P3V.nt.nb", "P5D.nt.nb", "P3D.nt.nb", "P5J.nt.nb"), with=F], na.rm=T))), + Total.P=num_median(rowSums(.SD[,c("P3V.nt.nb", "P5D.nt.nb", "P3D.nt.nb", "P5J.nt.nb"), with=F], na.rm=T)), + Median.CDR3.l=median(.SD$CDR3.Length.DNA)), by=c("Sample")]) newData[,sapply(newData, is.numeric)] = round(newData[,sapply(newData, is.numeric)],1) diff -r 4f8a1d121384 -r beaa487ecf43 report_clonality/r_wrapper.sh --- a/report_clonality/r_wrapper.sh Mon Sep 05 11:15:22 2016 -0400 +++ b/report_clonality/r_wrapper.sh Wed Dec 07 08:36:23 2016 -0500 @@ -219,31 +219,31 @@ #if [[ "$hasJunctionData" == "Yes" ]] ; then if [ -a "$outputDir/junctionAnalysisProd_mean.csv" ] ; then echo "
" >> $outputFile - echo "" >> $outputFile - while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP + echo "
Productive mean
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.P
" >> $outputFile + while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP median do - echo "" >> $outputFile + echo "" >> $outputFile done < $outputDir/junctionAnalysisProd_mean.csv echo "
Productive mean
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.PMedian.CDR3
$Sample$unique$VDEL$P1$N1$P2$DELD$DDEL$P3$N2$P4$DELJ$TotalDel$TotalN$TotalP
$Sample$unique$VDEL$P1$N1$P2$DELD$DDEL$P3$N2$P4$DELJ$TotalDel$TotalN$TotalP$median
" >> $outputFile - echo "" >> $outputFile - while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP + echo "
Unproductive mean
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.P
" >> $outputFile + while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP median do - echo "" >> $outputFile + echo "" >> $outputFile done < $outputDir/junctionAnalysisUnProd_mean.csv echo "
Unproductive mean
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.PMedian.CDR3
$Sample$unique$VDEL$P1$N1$P2$DELD$DDEL$P3$N2$P4$DELJ$TotalDel$TotalN$TotalP
$Sample$unique$VDEL$P1$N1$P2$DELD$DDEL$P3$N2$P4$DELJ$TotalDel$TotalN$TotalP$median
" >> $outputFile - echo "" >> $outputFile - while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP + echo "
Productive median
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.P
" >> $outputFile + while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP median do - echo "" >> $outputFile + echo "" >> $outputFile done < $outputDir/junctionAnalysisProd_median.csv echo "
Productive median
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.PMedian.CDR3
$Sample$unique$VDEL$P1$N1$P2$DELD$DDEL$P3$N2$P4$DELJ$TotalDel$TotalN$TotalP
$Sample$unique$VDEL$P1$N1$P2$DELD$DDEL$P3$N2$P4$DELJ$TotalDel$TotalN$TotalP$median
" >> $outputFile - echo "" >> $outputFile - while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP + echo "
Unproductive median
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.P
" >> $outputFile + while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP median do - echo "" >> $outputFile + echo "" >> $outputFile done < $outputDir/junctionAnalysisUnProd_median.csv echo "
Unproductive median
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.PMedian.CDR3
$Sample$unique$VDEL$P1$N1$P2$DELD$DDEL$P3$N2$P4$DELJ$TotalDel$TotalN$TotalP
$Sample$unique$VDEL$P1$N1$P2$DELD$DDEL$P3$N2$P4$DELJ$TotalDel$TotalN$TotalP$median
" >> $outputFile diff -r 4f8a1d121384 -r beaa487ecf43 report_clonality_igg.xml --- a/report_clonality_igg.xml Mon Sep 05 11:15:22 2016 -0400 +++ b/report_clonality_igg.xml Wed Dec 07 08:36:23 2016 -0500 @@ -11,12 +11,12 @@ - - - - - - + + + + + +