dereneaton / ipyrad

Interactive assembly and analysis of RAD-seq data sets
http://ipyrad.readthedocs.io
GNU General Public License v3.0
70 stars 39 forks source link

Merged assembly project_dir collision #413

Closed isaacovercast closed 3 years ago

isaacovercast commented 4 years ago

Currently if you merge two assemblies you have some inconsistency with project_dir values. For example after a merge in the json file you have:

    "assembly":{
        "name":"merged",
        "dirs":{
            "project":"/media/4TB/isaac/ipyrad/test-data/cannabis/TBT-data",

and also:

        "paramsdict":{
            "_assembly_name":"merged",
            "_project_dir":"/media/4TB/isaac/ipyrad/test-data/cannabis/TBT-data/A-7724087",

Now if you run an assembly the output shows this:

ipyrad -p params-merged.txt -s 67 -c 40
  loading Assembly: merged
  from saved path: /media/4TB/isaac/ipyrad/test-data/cannabis/TBT-data/merged.json

But the json file actually lives in the paramsdict._project_dir, so this message is wrong.

I think the default should be to use cwd as the project dir when merging, rather than inheriting the project_dir of the first assembly in the merge list, which feels hackish, and which creates all the merged assembly directories inside this directory, which is annoying and usually not what you want, organizationally speaking.

isaacovercast commented 3 years ago

I fixed the inconsistency between data.dirs.project dir and data.params.project dir in the merged assembly.

If you don't like the default project_dir, then you can just change it.