Skip to content

pxcomp outputs an enormous file, or rejects unaligned sequences. #175

@Gullumluvl

Description

@Gullumluvl

Hi all,

I compiled phyx (commit b359a6d, 2022/08/19) on Ubuntu 20.04. The tests from make check all pass.

I am trying to compute the Chi square test of compositional homogeneity with pxcomp from fasta input, but it fails in different manners:

  1. nucleotides, aligned, ungapped:

     echo -e '>a\nACGTACAAGTCCATT\n>b\nACCTAAGGCTTCAAG' | pxcomp -o test_pxcomp.out
    

    This succeeds, but the output file is 4.1G ! It contains some gigantic lines and we have to be careful not to crash the computer while trying to open it:

     sed -n 'l80' test_pxcomp.out | head -n 20
    
            Observed character counts:$
                 A            C            G            T        Nchar$
    a            5            4            2            4           15$
    b            5            4            3            3           15$
    Total                                                                          \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
                                                                                   \
    

    So this file is filled with 4G of space characters I suppose.

  2. nucleotides, aligned, with gap characters

     echo -e '>a\n-ACGTACAAGTCCATT\n>b\nA-CCTAAGGCTTCAAG' | pxcomp -o test_pxcomp.out
    

    output file is also 4.1G.

  3. nucleotides, unaligned, no gap

     echo -e '>a\nACGTA\n>b\nACCTAAGGCTTCAAG' | pxcomp -o test_pxcomp.out
    

    Fails with Error: sequences must be aligned. Exiting..
    However for this kind of test, there is no need to have aligned sequences. The average alignment frequencies can be scaled to the given sequence size, is this implemented this way?

  4. amino-acids, aligned, no gap:

     echo -e '>a\nABCDEFGHIKLMNPQRSTVWXYZ\n>b\nAAADEFGHIKLMNPQRSTVWZZZ' | pxcomp -o test_pxcomp.out
    

    Fails with Error: missing/ambiguous characters not currently supported. Exiting.

Any ideas for fixing these problems, especially the file size problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions