# HG changeset patch # User davidvanzessen # Date 1477575645 14400 # Node ID 275ab5175fd6f13ef3a164fe6314437b927ebb63 # Parent e85fec274cde825eb8858b72b34d0060c8a6dd99 Uploaded diff -r e85fec274cde -r 275ab5175fd6 merge_and_filter.r --- a/merge_and_filter.r Thu Oct 27 07:26:45 2016 -0400 +++ b/merge_and_filter.r Thu Oct 27 09:40:45 2016 -0400 @@ -194,6 +194,10 @@ result[!higher_than,"best_match"] = paste("unmatched,", result[!higher_than,"best_match"]) } +if(class.filter == "101_101"){ + result$best_match = "all" +} + if(any(higher_than, na.rm=T)){ #summ = summ[higher_than,] } diff -r e85fec274cde -r 275ab5175fd6 shm_csr.py --- a/shm_csr.py Thu Oct 27 07:26:45 2016 -0400 +++ b/shm_csr.py Thu Oct 27 09:40:45 2016 -0400 @@ -85,7 +85,7 @@ AALength = 64 AA_mutation = [0] * AALength -AA_mutation_dic = {"IGA": AA_mutation[:], "IGG": AA_mutation[:], "IGM": AA_mutation[:], "unm": AA_mutation[:]} +AA_mutation_dic = {"IGA": AA_mutation[:], "IGG": AA_mutation[:], "IGM": AA_mutation[:], "unm": AA_mutation[:], "all": AA_mutation[:]} AA_mutation_empty = AA_mutation[:] aa_mutations_by_id_file = outfile[:outfile.rindex("/")] + "/aa_id_mutations.txt" diff -r e85fec274cde -r 275ab5175fd6 shm_csr.r --- a/shm_csr.r Thu Oct 27 07:26:45 2016 -0400 +++ b/shm_csr.r Thu Oct 27 09:40:45 2016 -0400 @@ -414,8 +414,8 @@ p = ggplot(dat.clss, aes(best_match, percentage_mutations)) p = p + geom_point(aes(colour=best_match), position="jitter") + geom_boxplot(aes(middle=mean(percentage_mutations)), alpha=0.1, outlier.shape = NA) p = p + xlab("Subclass") + ylab("Frequency") + ggtitle("Frequency scatter plot") + theme(panel.background = element_rect(fill = "white", colour="black"), text = element_text(size=13, colour="black")) -p = p + scale_fill_manual(values=c("IGA" = "blue4", "IGA1" = "lightblue1", "IGA2" = "blue4", "IGG" = "olivedrab3", "IGG1" = "olivedrab3", "IGG2" = "red", "IGG3" = "gold", "IGG4" = "darkred", "IGM" = "darkviolet")) -p = p + scale_colour_manual(values=c("IGA" = "blue4", "IGA1" = "lightblue1", "IGA2" = "blue4", "IGG" = "olivedrab3", "IGG1" = "olivedrab3", "IGG2" = "red", "IGG3" = "gold", "IGG4" = "darkred", "IGM" = "darkviolet")) +p = p + scale_fill_manual(values=c("IGA" = "blue4", "IGA1" = "lightblue1", "IGA2" = "blue4", "IGG" = "olivedrab3", "IGG1" = "olivedrab3", "IGG2" = "red", "IGG3" = "gold", "IGG4" = "darkred", "IGM" = "darkviolet", "all" = "blue4")) +p = p + scale_colour_manual(values=c("IGA" = "blue4", "IGA1" = "lightblue1", "IGA2" = "blue4", "IGG" = "olivedrab3", "IGG1" = "olivedrab3", "IGG2" = "red", "IGG3" = "gold", "IGG4" = "darkred", "IGM" = "darkviolet", "all" = "blue4")) png(filename="scatter.png") print(p) @@ -441,7 +441,7 @@ p = ggplot(frequency_bins_data, aes(frequency_bins, frequency)) p = p + geom_bar(aes(fill=best_match_class), stat="identity", position="dodge") + theme(panel.background = element_rect(fill = "white", colour="black"), text = element_text(size=13, colour="black")) -p = p + xlab("Frequency ranges") + ylab("Frequency") + ggtitle("Mutation Frequencies by class") + scale_fill_manual(values=c("IGA" = "blue4", "IGG" = "olivedrab3", "IGM" = "black")) +p = p + xlab("Frequency ranges") + ylab("Frequency") + ggtitle("Mutation Frequencies by class") + scale_fill_manual(values=c("IGA" = "blue4", "IGG" = "olivedrab3", "IGM" = "black", "all" = "blue4")) png(filename="frequency_ranges.png") print(p) diff -r e85fec274cde -r 275ab5175fd6 wrapper.sh --- a/wrapper.sh Thu Oct 27 07:26:45 2016 -0400 +++ b/wrapper.sh Thu Oct 27 09:40:45 2016 -0400 @@ -260,17 +260,17 @@ done < $outdir/data_${func}.txt else - tmp=`cat $outdir/unmatched_${func}_n.txt` + tmp=`cat $outdir/all_${func}_n.txt` echo "