Skip to content

Commit

Permalink
V0.99.5 (#29)
Browse files Browse the repository at this point in the history
* additional viz tests

* fix bar filtering bug

* fix filter_to_sig bug and add test

* column check in heatmap

* fix heatmap bug introduced in last bugfix

* update dependencies and fix pca error (coming from r > 3.5?)

* fix tabfile bug

* rotate x axis text more (more vertical)

* fix data frame - probably due to new pandas

* pull out obo download links

* GeneOntologyDb code rewrites; Check_args fix (#30)

* condense ifelse conditional for is_in_db function

* fix incorrect filename for tax_check

* simplify slim-ancestors loop

* filter ontology in barplot

* bump version to 0.99.5
  • Loading branch information
Caleb Easterly authored Apr 1, 2019
2 parents a568978 + d6d5f58 commit e35586a
Show file tree
Hide file tree
Showing 21 changed files with 415 additions and 49 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
metaquantome/data/test/taxa.sqlite
metaquantome/data/test/taxa.sqlite.traverse.pkl

# sometimes ggplot makes empty Rplots.pdf
Rplots.pdf

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
21 changes: 11 additions & 10 deletions dev_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ channels:
- conda-forge
- r
dependencies:
- python==3.5.*
- ete3==3.1.1
- goatools==0.7.11
- statsmodels==0.8.0
- biopython==1.70
- python>=3
- ete3==3.1.*
- goatools==0.7.*
- statsmodels==0.8.*
- biopython==1.73.*
- pandas==0.23.*
- r-gplots==3.0.1
- r-ggplot2
- r-base==3.4.*
- r-jsonlite=1.5
- libiconv
- numpy 1.15.*
- r-gplots==3.0.*
- r-ggplot2==3.0.*
- r-base==3.5.1
- r-jsonlite=1.5.*
- libiconv 1.15.*
10 changes: 6 additions & 4 deletions metaquantome/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ def cli():
flip_fc=args.flip_fc,
gosplit=args.gosplit,
sinfo=args.samps,
filter_to_sig=args.filter_to_sig,
alpha=args.alpha,
whichway=args.whichway,
name=args.name,
id=args.id,
target_onto=args.target_onto,
width=args.width,
height=args.height)
height=args.height,
tabfile=args.tabfile)
else:
ValueError('incorrect mode. please provide one of "db", "expand", "filter", "stat", or "viz".')
sys.exit(0)
Expand Down Expand Up @@ -242,6 +244,9 @@ def parse_args_cli():
' heatmap and PCA plot, so the colors can be tweaked to match. ')
bar.add_argument('--target_rank',
help="(Tax bar and FT dist). Taxonomic rank to restrict to in the plot. ")
bar.add_argument('--target_onto', choices=["mf", "bp", "cc"],
help="(Function and FT dist bar only) " +
"Ontology to restrict to, for function distribution.")
bar.add_argument("--whichway", choices=["f_dist", "t_dist"],
help="(FT dist only) " +
"Which distribution - functional distribution for a taxon (f_dist) or " +
Expand All @@ -252,9 +257,6 @@ def parse_args_cli():
bar.add_argument("--id",
help="(FT dist bar only) " +
"Taxonomic or functional term id - either a NCBI taxID or a GO term id (GO:XXXXXXX)")
bar.add_argument('--target_onto', choices=["mf", "bp", "cc"],
help="(FT dist bar only) " +
"Ontology to restrict to, for function distribution.")

volc = parser_viz.add_argument_group('Volcano Plot')
volc.add_argument('--fc_name',
Expand Down
Binary file added metaquantome/data/test/cli_bar_viz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added metaquantome/data/test/cli_bar_viz2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added metaquantome/data/test/cli_heatmap_viz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added metaquantome/data/test/cli_pca_viz.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions metaquantome/data/test/eggnog_out.tab

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions metaquantome/data/test/eggnog_viz_file.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
id name namespace NS_mean WS_mean int737NS int737WS int852NS int852WS int867NS int867WS int737NS_n_peptide int737WS_n_peptide int852NS_n_peptide int852WS_n_peptide int867NS_n_peptide int867WS_n_peptide int737NS_n_samp_children int737WS_n_samp_children int852NS_n_samp_children int852WS_n_samp_children int867NS_n_samp_children int867WS_n_samp_children
GO:0008152 metabolic process biological_process 9707895600.63897 34.4676527340745 32.7280807192344 33.639915914834 33.8500846328958 35.3680642871384 32.6033492340827 33.6566592988174 1837 1837 1837 1837 1837 1837 3 3 3 3 3 3
GO:0009058 biosynthetic process biological_process 3977879569.3907 33.2068587142223 31.5038426691202 32.3344633958136 32.5457060492145 34.154051958603 31.2863832807592 32.2790138218569 576 576 576 576 576 576 NA NA NA NA NA NA
GO:0006807 nitrogen compound metabolic process biological_process 3333526855.75693 33.089118314848 31.3274682605914 32.2651614156765 32.2393712217206 33.9854328532233 31.0581331702586 32.2877493545852 763 763 763 763 763 763 NA NA NA NA NA NA
GO:0006412 translation biological_process 2440026495.81359 32.4930473371394 30.8105936229541 31.6128211401251 31.846608199857 33.4455891939318 30.5527566639519 31.5536159837728 336 336 336 336 336 336 NA NA NA NA NA NA
GO:0006950 response to stress biological_process 1052880100.76931 31.3981405492947 29.6095404092094 30.439676321524 30.5689283794754 32.393517103388 29.4759257423614 30.3742688501823 124 124 124 124 124 124 NA NA NA NA NA NA
GO:0042221 response to chemical biological_process 965521061.018174 30.8296096443541 29.4808523042029 29.9278611878217 30.4629201331805 31.8156195431379 29.3138771113971 29.7828763814873 85 85 85 85 85 85 NA NA NA NA NA NA
GO:0044710 metabolic process biological_process 928705245.346089 30.6072989115392 29.3036916765872 30.0343848802313 30.4615672319471 31.2433837819293 29.2644431642638 30.237026652397 225 225 225 225 225 225 3 3 3 3 3 3
GO:0071840 cellular component organization or biogenesis biological_process 833223817.553338 31.5724843198215 29.5524724554893 31.0024286599174 30.1336470253456 32.3466932720115 28.99316994804 30.8738545987975 357 357 357 357 357 357 NA NA NA NA NA NA
GO:0005975 carbohydrate metabolic process biological_process 379644473.58704 30.2823742633555 27.4581777552516 28.9388737660123 29.2889137336267 31.4249235572303 28.1538245092415 28.9540435785897 76 76 76 76 76 76 NA NA NA NA NA NA
GO:0006091 generation of precursor metabolites and energy biological_process 373375658.545852 27.5844108414961 26.7198540418534 27.2161871812721 29.5462583955409 27.603990048666 27.749246320597 27.8613248072876 30 30 30 30 30 30 NA NA NA NA NA NA
GO:0006629 lipid metabolic process biological_process 346873604.466979 28.4302522117954 27.5680638918355 28.0217901314741 29.1700984804642 28.9561582409451 27.8238760468995 28.120421411102 37 37 37 37 37 37 NA NA NA NA NA NA
GO:0065003 protein-containing complex assembly biological_process 223362430.986751 29.4067502060857 27.7185066355636 29.0195327862999 28.1835372517938 30.0898188984621 27.1053181932927 28.7398209542951 83 83 83 83 83 83 NA NA NA NA NA NA
GO:0044711 biosynthetic process biological_process 220756695.513963 28.7739551105881 27.1093723370704 28.4003539740075 28.4104810597675 29.3934280879723 27.2597605688579 28.2424502003084 53 53 53 53 53 53 NA NA NA NA NA NA
GO:0044723 carbohydrate metabolic process biological_process 182807836.125096 28.93667511454 26.448399628704 27.9008315674069 28.2396393635986 29.9843751125869 27.0599307314212 27.7686749761679 34 34 34 34 34 34 NA NA NA NA NA NA
GO:0019222 regulation of metabolic process biological_process 173056856.95311 28.9389001060965 27.0494629499546 28.2721701007768 27.836284601413 29.6501969737214 27.0673584710354 28.4903755600971 69 69 69 69 69 69 NA NA NA NA NA NA
GO:0006810 transport biological_process 140537615.614438 28.7939728267842 27.1234873806423 27.9615606778428 27.4144285386699 29.5408914880366 26.524314216561 28.3984348617235 88 88 88 88 88 88 NA NA NA NA NA NA
GO:0016032 viral process biological_process 111058995.875521 30.4491645013834 26.3289762021563 29.2487087831025 27.1434558706649 31.5367058114516 26.5844879797392 29.263908857592 48 48 48 48 48 48 NA NA NA NA NA NA
GO:0016070 RNA metabolic process biological_process 91888884.7293597 28.1369040778828 26.1677866053689 27.693875726079 26.8519757597805 28.5989127651248 26.2381122887607 27.9638332212402 81 81 81 81 81 81 NA NA NA NA NA NA
GO:0006461 protein-containing complex assembly biological_process 88525220.719722 27.5427325704944 26.2738037562703 27.2967939297801 27.0298059946766 27.9798815285066 25.4990572646483 27.2258576018008 40 40 40 40 40 40 NA NA NA NA NA NA
GO:0006457 protein folding biological_process 75079182.3365918 29.268835134676 25.7050718748645 28.2845189662675 26.7348727386628 30.2745828042056 25.8105457595204 28.2294977490008 32 32 32 32 32 32 NA NA NA NA NA NA
3 changes: 3 additions & 0 deletions metaquantome/data/test/rudney_samples.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
group colnames
NS X730NS,X733NS,X734NS,X737NS,X760NS,X769NS,X781NS,X795NS,X852NS,X861NS,X866NS,X867NS
WS X730WS,X733WS,X734WS,X737WS,X760WS,X769WS,X781WS,X795WS,X852WS,X861WS,X866WS,X867WS
Loading

0 comments on commit e35586a

Please sign in to comment.