biojava | source project dedicated to providing a Java library | Genomics library
kandi X-RAY | biojava Summary
kandi X-RAY | biojava Summary
:book::microscope::coffee: BioJava is an open-source project dedicated to providing a Java library for processing biological data.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Print out the fat Cat Core CNF core
- Generate a seed .
- Handles a molecule command .
- Registers a protein modification from an XML file .
- Gets a map of strata info
- Configures the bean with the given arguments .
- Converts an alignment into a residue group
- Refine alternative alignment .
- This method consumes an atom site column
- Truncate a chain
biojava Key Features
biojava Examples and Code Snippets
Community Discussions
Trending Discussions on biojava
QUESTION
Summary:
I have a program I want to ship as a single jar
file.
It depends on three big resource files (700MB each) in a binary format. The file content can easily be accessed via indexing, my parser therefore reads these files as RandomAccessFile
-objects.
So my goal is to access resource files from a jar
via File
objects.
My problem:
When accessing the resource files from my file system, there is no issue, but I aim to pack them into the jar
file of the program, so the user does not need to handle these files themselves.
The only way I found so far to access a file packed in a jar
is via InputStream
(generated by class.getResourceAsStream()
), which is totally useless for my application as it would be much too slow reading these files from start to end instead of using RandomAccessFile
.
Copying the file content into a file, reading it and deleting it in runtime is no option eigher for the same reason.
Can someone confirm that there is no way to achieve my goal or provide a solution (or a hint so I can work it out myself)?
What I found so far:
I found this answer and if I understand the answer it says that there is no way to solve my problem:
Resources in a .jar file are not files in the sense that the OS can access them directly via normal file access APIs.
And since java.io.File represents exactly that kind of file (i.e. a thing that looks like a file to the OS), it can't be used to refer to anything in a .jar file.
A possible workaround is to extract the resource to a temporary file and refer to that with a File.
I think I can follow the reasoning behind it, but it is over eight years old now and while I am not very educated when it comes to file systems and archives, I know that the Java language has evolved quite much since then, so maybe there is hope? :)
Probably useless background information:
The files are genomes in the 2bit
format and I use the TwoBitParser
from biojava
via the wrapper class TwoBitFacade
?. The Javadocs
can be found here and here.
ANSWER
Answered 2018-Jun-12 at 12:14Resources are not files, and they live in a JAR file, which is not a random access medium.
QUESTION
I am using breeze-viz 0.3, but need to use newer version of jfreechart. According to the dependency table https://mvnrepository.com/artifact/org.scalanlp/breeze-viz_2.10/0.3
jfreechart 1.0.13 is the default, but 1,0.19 is the updated version, which is the one I want. I added the lines
...ANSWER
Answered 2017-Feb-15 at 08:30You see jfreedchart 1.0.13
, but it's another one. If you will have a look onto dependency graph for viz, you will see, that it depends on "jfree" % "jfreechart" % "1.0.13"
, while you want to use "org.jfree" % "jfreechart" % "1.0.19"
, which doesn't intersect with the previous one, since they have different groupId. So, you need to add
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install biojava
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page