# HG changeset patch # User davidvanzessen # Date 1482317851 18000 # Node ID da95be204ebc3733df3730527a78f218c7afdb82 # Parent 21ca9391a3b7aae3e12341ee39178f529205c2f2 Uploaded diff -r 21ca9391a3b7 -r da95be204ebc complete_immunerepertoire.xml --- a/complete_immunerepertoire.xml Tue Dec 20 09:06:51 2016 -0500 +++ b/complete_immunerepertoire.xml Wed Dec 21 05:57:31 2016 -0500 @@ -103,9 +103,10 @@ - - - + + + + diff -r 21ca9391a3b7 -r da95be204ebc report_clonality/IGH_junctie_analyse.png Binary file report_clonality/IGH_junctie_analyse.png has changed diff -r 21ca9391a3b7 -r da95be204ebc report_clonality/RScript.r --- a/report_clonality/RScript.r Tue Dec 20 09:06:51 2016 -0500 +++ b/report_clonality/RScript.r Wed Dec 21 05:57:31 2016 -0500 @@ -594,7 +594,10 @@ res = merge(res, clone_table, by="paste", all=T) } - res[is.na(res)] = 0 + res[is.na(res)] = 0 + + write.table(res, file=paste("raw_clonality_", sample_id, ".csv", sep=""), sep=",",quote=F,row.names=F,col.names=F) + infer.result = infer.clonality(as.matrix(res[,2:ncol(res)])) #print(infer.result) @@ -607,7 +610,7 @@ colnames(coincidence.table) = c("Coincidence Type", "Raw Coincidence Freq") write.table(coincidence.table, file=paste("lymphclon_coincidences_", sample_id, ".csv", sep=""), sep=",",quote=F,row.names=F,col.names=T) } - } else { + } else if(clonality_method == "old") { clonalFreq = data.frame(data.table(clonalityFrame)[, list(Type=.N), by=c("Sample", "clonaltype")]) #write files for every coincidence group of >1 diff -r 21ca9391a3b7 -r da95be204ebc report_clonality/r_wrapper.sh --- a/report_clonality/r_wrapper.sh Tue Dec 20 09:06:51 2016 -0500 +++ b/report_clonality/r_wrapper.sh Wed Dec 21 05:57:31 2016 -0500 @@ -32,6 +32,7 @@ cp $dir/script.js $outputDir cp $dir/jquery-1.11.0.min.js $outputDir cp $dir/pure-min.css $outputDir +cp $dir/IGH_junctie_analyse.png $outputDir samples=`cat $outputDir/samples.txt` echo "

Click here for the results

Tip: Open it in a new tab (middle mouse button or right mouse button -> 'open in new tab' on the link above)
" > $2 @@ -182,18 +183,26 @@ hasReplicateColumn="$(if head -n 1 $inputFile | grep -q 'Replicate'; then echo 'Yes'; else echo 'No'; fi)" echo "$hasReplicateColumn" #if its a 'new' merged file with replicate info -if [[ "$hasReplicateColumn" == "Yes" ]] ; then - echo "
" >> $outputFile +if [[ "$hasReplicateColumn" == "Yes" && "${clonality_method}" != "none" ]] ; then + if [[ "${clonality_method}" == "boyd" ]] ; then + echo "
" >> $outputFile + else + echo "
" >> $outputFile + fi + for sample in $samples; do echo "${clonality_method}" if [[ "${clonality_method}" == "old" ]] ; then echo "in old" clonalityScore="$(cat $outputDir/ClonalityScore_$sample.csv)" echo "
" >> $outputFile - echo "" >> $outputFile + + if [[ "${clonality_method}" == "boyd" ]] ; then + echo "" >> $outputFile + fi #replicate,reads,squared - echo "" >> $outputFile + echo "" >> $outputFile while IFS=, read replicate reads squared do echo "" >> $outputFile @@ -206,7 +215,7 @@ done < $outputDir/ReplicateSumReads_$sample.csv #overview - echo "" >> $outputFile + echo "" >> $outputFile while IFS=, read type count weight weightedCount do if [[ "$type" -eq "1" ]]; then @@ -238,6 +247,8 @@ #if [[ "$hasJunctionData" == "Yes" ]] ; then if [ -a "$outputDir/junctionAnalysisProd_mean.csv" ] ; then echo "
" >> $outputFile + echo "" >> $outputFile + echo "
Clonality Score: $clonalityScore
Clonality Score: $clonalityScore
Replicate IDNumber of Reads
Replicate IDNumber of Sequences
$replicate$reads
Coincidence TypeRaw Coincidence Freq
Number of replicates containing the coincidenceNumber of sequences shared between replicates
" >> $outputFile while IFS=, read Sample unique VDEL P1 N1 P2 DELD DDEL P3 N2 P4 DELJ TotalDel TotalN TotalP median do
Productive mean
SamplecountV.DELP1N1P2DEL.DD.DELP3N2P4DEL.JTotal.DelTotal.NTotal.PMedian.CDR3