Open adamia opened 10 years ago
I too am interested in this functionality. I think the best way would be to parse the output from the logfiles to store the file paths as variables in the notebook, and to parse the input to insert the variables as necessary before handing off to mothur for execution. My question would be, are all the functions in mothur that generate output files consistent in the way they are reported. i.e. in the format:
Output File Names: stability.trim.contigs.good.unique.good.filter.unique.precluster.pick.pick.pick.an.unique_list.shared
If this sounds like a good idea I can get working on this.
Going through the MySeq SOP, I noticed that mothur is not remembering session variables when used in an iPython notebook. For example, if you look in the Reducing Sequencing and PCR errors section, there is a line that says "Also, mothur is smart enough to remember that we used 8 processors in make.contigs and so it will use that throughout your current session." However, if you then do steps in the SOP after that one step where
processors=X
is specified, it reverts to 1. Another example is trying to run something likesummary.seqs(fasta=current, count=current)
or any of the commands where an option is omitted on the assumption that it will reuse a session variable, which will fail.I think this has to do with the fact that mothur is being launched each time a block of mothur commands is executed in the iPython notebook. Each time it launches and closes, it forgets what it knew. Perhaps there would be a way for mothurmagic to track what is stored (get.current() or something) and reload it every time mothur is called later.