Mercurial > repos > davidvanzessen > mutation_analysis
diff mutation_analysis.r @ 73:13c3710604ef draft
Uploaded
author | davidvanzessen |
---|---|
date | Wed, 04 May 2016 08:40:31 -0400 |
parents | 51d92233fb5d |
children | b523ce95d857 |
line wrap: on
line diff
--- a/mutation_analysis.r Wed May 04 04:28:02 2016 -0400 +++ b/mutation_analysis.r Wed May 04 08:40:31 2016 -0400 @@ -6,7 +6,6 @@ input = args[1] genes = unlist(strsplit(args[2], ",")) outputdir = args[3] -print(args[4]) include_fr1 = ifelse(args[4] == "yes", T, F) setwd(outputdir) @@ -28,8 +27,6 @@ stop("No data") } - - cleanup_columns = c("FR1.IMGT.c.a", "FR2.IMGT.g.t", "CDR1.IMGT.Nb.of.nucleotides", @@ -111,7 +108,7 @@ dat[,col] = gsub("\\(.*\\)", "", dat[,col]) #dat[dat[,col] == "",] = "0" dat[,col] = as.numeric(dat[,col]) - dat[is.na(dat[,col]),] = 0 + dat[is.na(dat[,col]),col] = 0 } regions = c("FR1", "CDR1", "FR2", "CDR2", "FR3") @@ -171,7 +168,6 @@ setwd(outputdir) - calculate_result = function(i, gene, dat, matrx, f, fname, name){ tmp = dat[grepl(paste(".*", gene, ".*", sep=""), dat$best_match),] @@ -313,7 +309,6 @@ install.packages("ggplot2", repos="http://cran.xl-mirror.nl/") } - genesForPlot = gsub("[0-9]", "", dat$best_match) genesForPlot = data.frame(table(genesForPlot)) colnames(genesForPlot) = c("Gene","Freq") @@ -330,7 +325,6 @@ pc dev.off() - #blegh genesForPlot = dat[grepl("ca", dat$best_match),]$best_match if(length(genesForPlot) > 0){