mcfrith / tandem-genotypes

GNU General Public License v3.0
45 stars 7 forks source link

Exception: can't read alignment header, needed for postmasking #15

Closed LiShuhang-gif closed 3 years ago

LiShuhang-gif commented 3 years ago

Hi, I have tried to use minimap2 to align the sequence and generated a file in PAF format. Then I converted the PAF format to MAF using paftools.js. And this maf file is used as the input file of tandem-genotypes. However, when I try to run tandem-genotypes, I get the following error message:

Traceback (most recent call last):
  File "/public/home/fan_lab/shali/yes/bin/tandem-genotypes", line 695, in <module>
    tandemGenotypes(opts, args)
  File "/public/home/fan_lab/shali/yes/bin/tandem-genotypes", line 634, in tandemGenotypes
    doOneMafFile(opts, tandemRepeats, maxRepeatLength, openFile(i))
  File "/public/home/fan_lab/shali/yes/bin/tandem-genotypes", line 533, in doOneMafFile
    for k, v in itertools.groupby(alignments, qrySeqName):
  File "/public/home/fan_lab/shali/yes/bin/tandem-genotypes", line 293, in alignmentsFromMaf
    raise Exception("can't read alignment header, "
Exception: can't read alignment header, needed for postmasking

I would like to know how to solve this error. Thanks in advance!

mcfrith commented 3 years ago

The recommended and tested solution is to use LAST.

Or you could try adding the tandem-genotypes option --postmask=0. (By default, it wants to read a LAST-style header with information about the alignment parameters.) But this isn't recommended: I don't know how well it will work.