faircloth-lab / phyluce

software for UCE (and general) phylogenomics
http://phyluce.readthedocs.org/
Other
80 stars 49 forks source link

Error came as "ValueError: Sequences must all be the same length" when I run phyluce_align_seqcap_align #346

Closed Charmainehan closed 3 months ago

Charmainehan commented 3 months ago

here is my command: phyluce_align_seqcap_align \ --input all-taxa-incomplete.fasta \ --output mafft \ --taxa 66 \ --incomplete-matrix \ --cores 128 \ --no-trim \ --output-format fasta \ --log-path log

After running the command, the error came out as "ValueError: Sequences must all be the same length" and the mafft folder is empty. Has anyone encountered this issue before?

brantfaircloth commented 3 months ago

Have you taken a look in the all-taxa-incomplete.fasta file to ensure that it looks correct?

You might try to explode that file by locus and manually run a few loci through mafft to see what happens when you align a single locus or two. That might help track down the problem.

Charmainehan commented 3 months ago

Have you taken a look in the all-taxa-incomplete.fasta file to ensure that it looks correct? Yes, I did they look good. the sequence heading like this: >uce-217_Apis_mellifera |uce-217

You might try to explode that file by locus and manually run a few loci through mafft to see what happens when you align a single locus or two. That might help track down the problem. I did that with Python, as phyluce seems not support exploding "by locus". then I align through 'mafft' with no problem. I can even trim them by 'phyluce_align_get_trimal_trimmed_alignments_from_untrimmed' but not 'phyluce_align_get_gblocks_trimmed_alignments_from_untrimmed', as it returns me an empty folder.

brantfaircloth commented 3 months ago

You can also explode in phyluce. Either way, I can't help much more without the file of data you are trying to align. If you can send that to me, I can take a look.

Charmainehan commented 3 months ago

Hello Brant, thank you for your generous offer. Now I have figure the processes out. Eventually, I chose to explode the fasta file by locus and then align them all up using 'mafft'. After that, I am able to do gblocks trimming with 'phyluce_align_get_gblocks_trimmed_alignments_from_untrimmed'! Thank you again!

brantfaircloth commented 3 months ago

Sounds good! Glad you got it working 👍