From 78e2fa90801e5cd897f89761a54e074690c81f66 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Thu, 8 Feb 2024 11:09:50 +0000 Subject: [PATCH 01/11] Update conda-docker-update.yml --- .github/workflows/conda-docker-update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda-docker-update.yml b/.github/workflows/conda-docker-update.yml index 84b3a6c..2874e2c 100644 --- a/.github/workflows/conda-docker-update.yml +++ b/.github/workflows/conda-docker-update.yml @@ -33,13 +33,13 @@ jobs: miniconda-version: latest - name: Build Conda Package - shell: bash -l {0} + shell: bash run: | conda install conda-build anaconda-client conda-verify conda build conda-recipe --output-folder ./build -c ecoevoinfo -c conda-forge -c bioconda - name: Upload Conda Package to Anaconda Cloud - shell: bash -l {0} + shell: bash env: ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} run: | From f968b87a35428c0b52614056b451f1c096a983e6 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Thu, 8 Feb 2024 12:36:30 +0000 Subject: [PATCH 02/11] Update conda-docker-update.yml --- .github/workflows/conda-docker-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-docker-update.yml b/.github/workflows/conda-docker-update.yml index 2874e2c..50ca6ba 100644 --- a/.github/workflows/conda-docker-update.yml +++ b/.github/workflows/conda-docker-update.yml @@ -35,7 +35,7 @@ jobs: - name: Build Conda Package shell: bash run: | - conda install conda-build anaconda-client conda-verify + conda install conda-build>=24.1.0 anaconda-client conda-verify conda build conda-recipe --output-folder ./build -c ecoevoinfo -c conda-forge -c bioconda - name: Upload Conda Package to Anaconda Cloud From 5e18c648cebebf7847891dab9776d636a0c16d5e Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Thu, 8 Feb 2024 12:44:47 +0000 Subject: [PATCH 03/11] Update conda-docker-update.yml --- .github/workflows/conda-docker-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-docker-update.yml b/.github/workflows/conda-docker-update.yml index 50ca6ba..3911e41 100644 --- a/.github/workflows/conda-docker-update.yml +++ b/.github/workflows/conda-docker-update.yml @@ -35,7 +35,7 @@ jobs: - name: Build Conda Package shell: bash run: | - conda install conda-build>=24.1.0 anaconda-client conda-verify + conda install -y conda-build>=24.1.0 anaconda-client conda-verify conda build conda-recipe --output-folder ./build -c ecoevoinfo -c conda-forge -c bioconda - name: Upload Conda Package to Anaconda Cloud From 77a395bac939a80c73c5bbbd9fc6de00aef30551 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Thu, 8 Feb 2024 12:46:41 +0000 Subject: [PATCH 04/11] Update conda-docker-update.yml --- .github/workflows/conda-docker-update.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/conda-docker-update.yml b/.github/workflows/conda-docker-update.yml index 3911e41..d6411f9 100644 --- a/.github/workflows/conda-docker-update.yml +++ b/.github/workflows/conda-docker-update.yml @@ -32,14 +32,18 @@ jobs: python-version: "3.10" miniconda-version: latest + - name: Install Dependencies + shell: bash -l {0} + run: | + conda install conda-build>=24.1.0 anaconda-client conda-verify + - name: Build Conda Package - shell: bash + shell: bash -l {0} run: | - conda install -y conda-build>=24.1.0 anaconda-client conda-verify conda build conda-recipe --output-folder ./build -c ecoevoinfo -c conda-forge -c bioconda - name: Upload Conda Package to Anaconda Cloud - shell: bash + shell: bash -l {0} env: ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} run: | From c356536770cd94524eefa11c7e93e72a129d1831 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Thu, 8 Feb 2024 12:57:48 +0000 Subject: [PATCH 05/11] Update conda-docker-update.yml --- .github/workflows/conda-docker-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-docker-update.yml b/.github/workflows/conda-docker-update.yml index d6411f9..200d852 100644 --- a/.github/workflows/conda-docker-update.yml +++ b/.github/workflows/conda-docker-update.yml @@ -35,7 +35,7 @@ jobs: - name: Install Dependencies shell: bash -l {0} run: | - conda install conda-build>=24.1.0 anaconda-client conda-verify + conda install -y conda-build>=24.1.0 anaconda-client conda-verify - name: Build Conda Package shell: bash -l {0} From e815de93338782ef5fd8884a6f567dc7c66ac16d Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Thu, 8 Feb 2024 13:04:26 +0000 Subject: [PATCH 06/11] Update conda-docker-update.yml --- .github/workflows/conda-docker-update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/conda-docker-update.yml b/.github/workflows/conda-docker-update.yml index 200d852..9a8538c 100644 --- a/.github/workflows/conda-docker-update.yml +++ b/.github/workflows/conda-docker-update.yml @@ -35,12 +35,12 @@ jobs: - name: Install Dependencies shell: bash -l {0} run: | - conda install -y conda-build>=24.1.0 anaconda-client conda-verify + conda install -y anaconda::conda-build>=24.1.0 anaconda-client conda-verify - name: Build Conda Package shell: bash -l {0} run: | - conda build conda-recipe --output-folder ./build -c ecoevoinfo -c conda-forge -c bioconda + conda build conda-recipe --output-folder ./build -c ecoevoinfo -c conda-forge -c bioconda || true - name: Upload Conda Package to Anaconda Cloud shell: bash -l {0} From 86bf85a6f9daed0b46c14a59b21a00cbbd0f5982 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Fri, 9 Feb 2024 13:40:45 +0000 Subject: [PATCH 07/11] report average distance matrix when RUNLOCI --- autostreamtree/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autostreamtree/cli.py b/autostreamtree/cli.py index 01381ad..d1cf213 100755 --- a/autostreamtree/cli.py +++ b/autostreamtree/cli.py @@ -96,7 +96,7 @@ def main(): ast.report_genmats_list(params, genlist, popgenlist, point_coords, pop_coords) - + ast.report_genmats(params, gen, pop_gen, point_coords, pop_coords) # Step 4: Constructing a minimal subgraph # Extract subgraph if needed From 706697fd5b62abd4f70471b668b99d5b11160682 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Fri, 9 Feb 2024 14:03:01 +0000 Subject: [PATCH 08/11] Fix bug in RUNLOCI causing incorrect obs X pred comparison --- autostreamtree/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autostreamtree/cli.py b/autostreamtree/cli.py index d1cf213..3e99203 100755 --- a/autostreamtree/cli.py +++ b/autostreamtree/cli.py @@ -181,8 +181,8 @@ def main(): print("Fitting StreamTree distances on per-locus matrices...") Rlist = list() ast.block_print() - for gen in genlist: - r = ast.fit_least_squares_distances(gen, inc.astype(int), + for locgen in genlist: + r = ast.fit_least_squares_distances(locgen, inc.astype(int), params.iterative, params.out, params.weight) Rlist.append(r) From d8bf9b1ccdc66dd289b8b3ed26618841a562edc0 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Fri, 9 Feb 2024 14:03:27 +0000 Subject: [PATCH 09/11] Update params.py --- autostreamtree/params.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/autostreamtree/params.py b/autostreamtree/params.py index 8447ff4..a622511 100644 --- a/autostreamtree/params.py +++ b/autostreamtree/params.py @@ -155,9 +155,6 @@ def __init__(self): self.overwrite = True elif opt == "perm": self.permutations = int(arg) - elif opt == "method": - print("Sorry: Option --method is not yet implemented.") - sys.exit(0) elif opt in ("plot", "plots"): self.plots = True elif opt == "phased": From 8f53c0368380fd484f1d6ae65dd80b0607a9c480 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Fri, 9 Feb 2024 14:58:03 +0000 Subject: [PATCH 10/11] Update cli.py --- autostreamtree/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autostreamtree/cli.py b/autostreamtree/cli.py index 3e99203..749eaa3 100755 --- a/autostreamtree/cli.py +++ b/autostreamtree/cli.py @@ -294,8 +294,8 @@ def main(): if params.run == "RUNLOCI": geoDF = geoDF.merge(sdD, on='EDGE_ID') geoDF.plot(column="stdevD", cmap="RdYlGn_r", legend=True) - plt.title("Stream network colored by standard deviation of", - "StreamTree fitted distances") + plt.title("Stream network colored by standard deviation of"+ + " StreamTree fitted distances") plt.savefig((str(params.out)+".streamsBystdevD.pdf")) geoDF.plot(column="fittedD", cmap="RdYlGn_r", legend=True) plt.title("Stream network colored by StreamTree fitted distances") From 540f9e0cbbf8bd384621c89618d5a3da3d958a96 Mon Sep 17 00:00:00 2001 From: Tyler Chafin Date: Tue, 20 Feb 2024 13:33:20 +0000 Subject: [PATCH 11/11] add information on locus filtering --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 665af22..8e01fec 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -61,7 +61,7 @@ Users may also provide pre-computed genetic distance matrices either directly at ## Empirical case study -To demonstrate autoStreamTree, we employed existing SNP data for Speckled Dace (*Rhinichthys osculus*)[@Mussmann2018]. Data represent 13,219 SNPs from N=762 individuals across 78 localities in the Colorado River ecosystem. +To demonstrate autoStreamTree, we employed existing SNP data for Speckled Dace (*Rhinichthys osculus*)[@Mussmann2018]. Data represent 5,742 SNPs from N=762 individuals across 78 localities in the Colorado River ecosystem, after removing those with >=50% missing data or minor allele frequency (MAF) < 0.1. Stream networks were parsed directly as a minimal sub-graph from RiverATLAS, which contains various local-scale environmental/ hydrological features as annotations (i.e., physiography, climate, land-cover, geology, anthropogenic effects) [@Linke2019]. Genetic distances were computed globally and per-locus among sites as linearized *F*~ST~ [@Weir1984] (=*F*~ST~/1-*F*~ST~). To compare with @Kalinowski2008, we used unweighted least-squares, iterative negative distance correction, and replicated analyses using linearized *F*~ST~ independently recalculated in Adegenet [@Jombart2008].