Open tetedange13 opened 5 years ago
Hi Felix,
Couple of thoughts.
If you could share a toy dataset as an MWE for me to reproduce this here, that would be very helpful.
Thank you. Best regards, -Miten
Hi Miten,
Thanks for your very quick answer.
I only had 1 issue creating the virtualenv (with distribute and markerLib https://github.com/pypa/setuptools/issues/535) but this package did not seem to be essential as:
make test
worked ;last_hmm_20.txt
file worked ;Not that large actually, so that I was surprised to get that PySam error... As they are reads from experimental Nanopore 1D R9 runs, I don't think that I am allowed to share them. Anyway, I can tell you that the fastq file (not .gz) was about 300 MB large, containing 244 458 reads. You can probably find some others available Nanopore runs, much bigger than mine (you can maybe give a try with this one from this publication where file1 = 730 MB, I did not try it myself), that will give you (I hope) the same error.
Yes that is precisely what I was trying to do: training a new HMM model by running MarginAlign on my own fastq file, with the --em --outputModel output.hmm
option! But at the end, the program displayed something like "model used to realign sam file = last_hmm_20.txt", instead of using my generated output.hmm
file.
Concerning the MWE you asked for:
Thanks again. Best regards. Felix.
Hello,
I am trying to use MarginAlign with the last release of Minimap2 (
2.15-r908-dirty
) and I had several issues:1) I had this mysterious PySam error, that has not yet been mentionned in any issues (I think). I did the following sequence of commands to install MarginAlign and get the last release of Minimap2:
Everything went fine, both on the
make test
and using a toy dataset (20 reads against a small database). But when I used a bigger fastq file (against the same database) an error appeared, apparently coming from thegetLastNonClippedPositionInRead
function (utils.py
file). ThealignedSegment.query_alignment_end
was crashing and returning a "SystemError: error return without exception set" (I checked the 2 other variables, they seemed fine). I found a PySam issue mentionning a similar thing, but in a different context (https://github.com/pysam-developers/pysam/issues/176), so I fixed this by installingpysam==0.9.0
instead of the version mentionned in the requirement.txt I don't know, maybe I did something wrong, or maybe it is linked with the use of the last version of Minimap2 ?2) Moreover, trying to use the
--em
option, to run the EM learning followed by the realignement, I realized that MarginAlign was always loading the HMM file "last_hmm_20.txt". So I had to comment the lineoptions.inputModel = os.path.join(pathToBaseNanoporeDir(), "src", "margin", "mappers", "last_hmm_20.txt")
in themarginAlign.py
file. I guess this is linked with the fact that LAST is set as the default aligner, but maybe there is something to fix here?Thanks in advance for your answer and many thanks for implementing Minimap2 into MarginAlign! Felix.