kaibioinfo / canopus_treemap Goto Github PK
View Code? Open in Web Editor NEWCANOPUS visualization for Jupyter notebook
License: MIT License
CANOPUS visualization for Jupyter notebook
License: MIT License
To ease installation, it would be great if this would be available as a package on PyPI or conda.
Would it be possible to add it to one of those repositories?
Hello,
I wonder if there is a function dedicated to export sunbursts to HTML file so I can share them easily ?
The html file created by the r.toFile
function doesn't seem to include any element for the visualization.
Thanks for your work it's a great tool !
Simon
Hi Kai,
I think this is a very interesting tool. I was wondering if you could provide an example of the output :)
Thanks in advance,
Cheers,
Eber
Hi,
Thanks for making this software!
I ran the following:
from canopus import Canopus
C = Canopus(sirius="/emc/cbmr/users/chs962/mani_diet_sirius_aligned_canopus")
C.npcSummary().to_csv("npc_summary.csv")
I ran it on a workspace generated with SIRIUS 4.8.2.
It failed with an error about parsing ascii that i unfortunately didn't save
presumably because the canopus.tsv is utf-8 encoded:
-bash-4.2$ file /emc/cbmr/users/chs962/mani_diet_sirius_aligned_canopus/canopus.tsv
/emc/cbmr/users/chs962/mani_diet_sirius_aligned_canopus/canopus.tsv: UTF-8 Unicode text, with very long lines
I applied the following fix:
@@ -771,7 +772,8 @@ class SiriusWorkspace(object):
def load_ontology_index(self):
mapping = dict()
with Path(self.rootdir, "canopus.tsv").open() as fhandle:
print(Path(self.rootdir, "canopus.tsv"))
with Path(self.rootdir, "canopus.tsv").open(encoding="utf-8") as fhandle:
header=None
ri = None
coid = None
Hello!
I'm trying to run CANOPUS for tutorial files, and after processing them with Sirius I get the "PermissionError" (see below) afrer I run the "C = Canopus(sirius="sirius_rosmarin")". Could you please tell me what could be the reason for this error?
Best wishes,
Vera
PermissionError Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 C = Canopus(sirius="sirius_rosmarin")
File ~\Downloads\canopus_treemap-master\canopus_treemap-master\canopus\api.py:26, in Canopus.init(self, sirius, gnps)
24 self.cleanNorm()
25 self.probabilityThreshold=0.33
---> 26 self.sirius = SiriusWorkspace(sirius)
27 self.Quant = self.sirius.make_quant()
28 self.conditions = dict()
File ~\Downloads\canopus_treemap-master\canopus_treemap-master\canopus\ontology.py:639, in SiriusWorkspace.init(self, rootdir, ontology)
637 if Path(rootdir).is_dir():
638 self.load_ontology_index()
--> 639 self.load_compounds()
640 print("%d compounds in workspace " % len(self.compounds))
641 else:
File ~\Downloads\canopus_treemap-master\canopus_treemap-master\canopus\ontology.py:771, in SiriusWorkspace.load_compounds(self)
769 break
770 cmp = Compound(name, compound_dir)
--> 771 siriusInstance = SiriusInstance(compound_dir)
772 if siriusInstance.canopusfp is not None:
773 self.compounds[name] = cmp
File ~\Downloads\canopus_treemap-master\canopus_treemap-master\canopus\ontology.py:512, in SiriusInstance.init(self, dirname)
510 def init(self, dirname):
511 self.dirname = dirname
--> 512 self.__parse()
File ~\Downloads\canopus_treemap-master\canopus_treemap-master\canopus\ontology.py:516, in SiriusInstance.__parse(self)
514 def __parse(self):
515 self.__parse_scores()
--> 516 self.__parse_canopus()
517 self.__parse_npc()
518 self.__parse_msfile()
File ~\Downloads\canopus_treemap-master\canopus_treemap-master\canopus\ontology.py:547, in SiriusInstance.__parse_canopus(self)
545 self.filename = canopusPath.name
546 elif canopusZipPath.exists():
--> 547 with zipfile.ZipFile(canopusZipPath) as myzip:
548 path = zipfile.Path(myzip, at=filename[0] + "_" + filename[1] + ".fpt")
549 if path.exists():
File ~\AppData\Local\Programs\Python\Python310\lib\zipfile.py:1249, in ZipFile.init(self, file, mode, compression, allowZip64, compresslevel, strict_timestamps)
1247 while True:
1248 try:
-> 1249 self.fp = io.open(file, filemode)
1250 except OSError:
1251 if filemode in modeDict:
PermissionError: [Errno 13] Permission denied: 'sirius_rosmarin\236_rosmarin_mzml_237\canopus'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.