Skip to content

anhph95/ifcbtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ifcbtools

Mixed MATLAB, Python, R, and analysis tools for NES-LTER IFCB data processing and metacommunity variability analysis.

Repository Layout

ifcbtools/
|-- ifcb.process/                   # MATLAB export plus Python processing package
|-- community.variability/          # Installable MATLAB, R, and Python metric code
|-- analysis/                       # Analysis workflows using the packages above
|-- data/                           # Local data products, ignored by Git
`-- README.md

Main Workflow

ifcb.process MATLAB export -> ifcb.process Python clean -> optional fill -> community.variability analysis

Documentation

Required MATLAB Export

All downstream processing starts from CSV files exported from the IFCB MATLAB summary products. Set MATLAB's current folder to your workspace, then download and run the standalone exporter:

scriptUrl = "https://raw.githubusercontent.com/anhph95/ifcbtools/main/ifcb.process/matlab/export_ifcb.m";
websave("export_ifcb.m", scriptUrl);
export_ifcb()

By default, the exporter processes NESLTER_transect. It reads from:

\\sosiknas1\IFCB_products\<dataset>\summary

and write the required exported products under the active MATLAB workspace:

<workdir>/data/<dataset>/ifcb_class.csv
<workdir>/data/<dataset>/ifcb_metadata.csv
<workdir>/data/<dataset>/ifcb_count.csv
<workdir>/data/<dataset>/ifcb_carbon.csv

Process a different dataset without editing the downloaded function:

export_ifcb("NESLTER_broadscale")

The standard count and carbon MAT filenames remain the defaults. Override SummaryDir, CountMatFile, CarbonMatFile, or OutputDir only when needed. The function does not assume a repository layout or search alternate paths.

Install Processing Package

From GitHub without manually cloning the repository:

pip install "git+https://github.com/anhph95/ifcbtools.git#subdirectory=ifcb.process"

From a local checkout:

pip install -e ifcb.process

This installs the ifcb.process package plus the processing commands:

ifcb-process
ifcb-fill-missing

Install Community Variability Packages

Python from GitHub:

pip install "git+https://github.com/anhph95/ifcbtools.git#subdirectory=community.variability/python"

R from CRAN:

install.packages("community.variability")

Local checkout:

pip install -e community.variability/python
R CMD INSTALL community.variability/R/community.variability

For MATLAB, add the metric folder to the MATLAB path:

addpath("community.variability/matlab/community_variability")

or run from a checkout:

run("community.variability/matlab/install_community_variability.m")
install_community_variability(true)

Copy Editable Analysis Scripts

Install the metric package separately, then copy editable starter scripts from inside R, Python, or MATLAB. See the language-specific analysis READMEs:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors