Mercurial > repos > davidvanzessen > phenotype_gene_relations
changeset 3:84ad738ae67e draft
Uploaded
author | davidvanzessen |
---|---|
date | Mon, 20 Jul 2015 05:20:57 -0400 |
parents | 78415abfc39f |
children | 035600ab7d3c |
files | phenotype_gene_relations.r phenotype_gene_relations.sh phenotype_gene_relations.xml |
diffstat | 3 files changed, 14 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/phenotype_gene_relations.r Mon Jul 20 04:30:00 2015 -0400 +++ b/phenotype_gene_relations.r Mon Jul 20 05:20:57 2015 -0400 @@ -17,7 +17,6 @@ inheritance.from.group.0.file = args[4] final.file = args[5] - #get ALL_SOURCES_ALL_FREQUENCIES.TXT all.sources = read.table(all.sources.file, header=T, sep="\t", comment.char="#", quote = "") @@ -55,7 +54,6 @@ filter.subset.hand.omt.1 = merge(subset.hand.filter.1, hpo.to.omt[,c("UNIQUE.HPO.IDENTIFIER", "OMT.1", "OMT.2", "OMT.3", "OMT.4", "OMT.5")], by.x="HPO.ID", by.y="UNIQUE.HPO.IDENTIFIER", all.x=T) filter.subset.hand.omt.1[is.na(filter.subset.hand.omt.1)] = 0 - #create COUNT NUMBER OF ANNOTATIONS IN PHENOTYPIC GROUPS FOR EACH GENE-DISEASE RELATION count.phenotype.in.disease = data.frame(data.table(subset.hand)[, list(count=.N), by=c("gene.symbol", "diseaseId","GROUP.CODE")]) count.phenotype.in.disease = dcast(count.phenotype.in.disease, gene.symbol + diseaseId ~ GROUP.CODE, value.var = "count") @@ -71,7 +69,7 @@ final$HPO.term.name.y[is.na(final$HPO.term.name.y)] = "No inheritance pattern available" final = final[,c("diseaseId", "gene.symbol", "gene.id.entrez.", "HPO.term.name.x", "variable", "GROUP.CODE", "value", "OMT.1", "OMT.2", "OMT.3", "OMT.4", "OMT.5", "HPO.term.name.y")] names(final) = c("diseaseId", "gene.symbol", "gene.id.entrez.", "HPO.term.name", "GROUP.CODE", "number", "ratio", "OMT.1", "OMT.2", "OMT.3", "OMT.4", "OMT.5", "inheritance") -write.table(final, file="final_file2.txt", quote=F, sep="\t", row.names=F, col.names=T) +write.table(final, file=final.file, quote=F, sep="\t", row.names=F, col.names=T)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/phenotype_gene_relations.sh Mon Jul 20 05:20:57 2015 -0400 @@ -0,0 +1,11 @@ +set -e + +dir="$(cd "$(dirname "$0")" && pwd)" + +all_sources=$1 +phenotypic_groups=$2 +hpo_to_omt=$3 +inheritence_from_group_0=$4 +output=$5 + +Rscript --verbose $dir/phenotype_gene_relations.r "$all_sources" "$phenotypic_groups" "$hpo_to_omt" "$inheritence_from_group_0" "$output" 2>&1
--- a/phenotype_gene_relations.xml Mon Jul 20 04:30:00 2015 -0400 +++ b/phenotype_gene_relations.xml Mon Jul 20 05:20:57 2015 -0400 @@ -1,7 +1,7 @@ <tool id="phenotype_gene_relations" name="Phenotype Gene Relations" version="1.0"> <description> </description> - <command interpreter="R"> - phenotype_gene_relations.r $all_sources $phenotypic_groups $hpo_to_omt $inheritence_from_group_0 $output + <command interpreter="bash"> + phenotype_gene_relations.sh $all_sources $phenotypic_groups $hpo_to_omt $inheritence_from_group_0 $output </command> <inputs> <param name="all_sources" format="tabular" type="data" label="All Sources" />