Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility for AreTomo v1.3.0 aln files #41

Merged
merged 2 commits into from
Nov 1, 2022

Conversation

EuanPyle
Copy link
Collaborator

@EuanPyle EuanPyle commented Nov 1, 2022

…ain in aln file

New aln files in v1.3 of AT have 3 lines of junk before useful info, (old versions had 2), which breaks the aln reader: this mod allows both versions to work.

@EuanPyle
Copy link
Collaborator Author

EuanPyle commented Nov 1, 2022

Example aln file for 1.3:

# AreTomo Alignment / Priims bprmMn 
# RawSize = 5760 4092 41
# NumPatches = 0
# SEC     ROT         GMAG       TX          TY      SMEAN     SFIT    SCALE     BASE     TILT
    0   -93.6692    1.00000    157.142    720.866     1.00     1.00     1.00     0.00    -51.98
    1   -93.6692    1.00000    130.526    686.004     1.00     1.00     1.00     0.00    -48.99
    2   -93.6692    1.00000    135.995    620.995     1.00     1.00     1.00     0.00    -45.98
    3   -93.6692    1.00000    108.331    572.701     1.00     1.00     1.00     0.00    -42.99
    4   -93.6692    1.00000    108.941    512.625     1.00     1.00     1.00     0.00    -39.99
    5   -93.6692    1.00000     84.490    451.466     1.00     1.00     1.00     0.00    -36.99
    6   -93.6692    1.00000     81.471    403.957     1.00     1.00     1.00     0.00    -33.99
    7   -93.6692    1.00000     61.171    350.820     1.00     1.00     1.00     0.00    -30.99
    8   -93.6692    1.00000     54.104    300.074     1.00     1.00     1.00     0.00    -27.99
    9   -93.6692    1.00000     43.330    273.491     1.00     1.00     1.00     0.00    -24.99
   10   -93.6692    1.00000     39.284    247.165     1.00     1.00     1.00     0.00    -21.99
   11   -93.6692    1.00000     33.427    213.190     1.00     1.00     1.00     0.00    -18.99
   12   -93.6692    1.00000     27.254    176.363     1.00     1.00     1.00     0.00    -15.99
   13   -93.6692    1.00000     25.066    140.100     1.00     1.00     1.00     0.00    -12.99
   14   -93.6692    1.00000     23.384     98.713     1.00     1.00     1.00     0.00     -9.99
   15   -93.6692    1.00000     15.737     57.712     1.00     1.00     1.00     0.00     -6.99
   16   -93.6692    1.00000     11.379     30.819     1.00     1.00     1.00     0.00     -4.00
   17   -93.6692    1.00000      0.000      0.000     1.00     1.00     1.00     0.00     -0.99
   18   -93.6692    1.00000     -4.137    -24.714     1.00     1.00     1.00     0.00      2.01
   19   -93.6692    1.00000      2.242    -53.349     1.00     1.00     1.00     0.00      5.01
   20   -93.6692    1.00000     -5.422    -82.151     1.00     1.00     1.00     0.00      8.00
   21   -93.6692    1.00000      1.357   -112.474     1.00     1.00     1.00     0.00     11.01
   22   -93.6692    1.00000     -3.247   -147.366     1.00     1.00     1.00     0.00     14.00
   23   -93.6692    1.00000      1.638   -180.845     1.00     1.00     1.00     0.00     17.00
   24   -93.6692    1.00000     -2.903   -237.837     1.00     1.00     1.00     0.00     20.00
   25   -93.6692    1.00000      0.473   -261.575     1.00     1.00     1.00     0.00     23.00
   26   -93.6692    1.00000      1.526   -317.741     1.00     1.00     1.00     0.00     26.00
   27   -93.6692    1.00000      0.551   -341.948     1.00     1.00     1.00     0.00     29.00
   28   -93.6692    1.00000      4.927   -396.563     1.00     1.00     1.00     0.00     32.00
   29   -93.6692    1.00000      1.483   -420.524     1.00     1.00     1.00     0.00     35.00
   30   -93.6692    1.00000     10.616   -468.995     1.00     1.00     1.00     0.00     38.00
   31   -93.6692    1.00000     -2.572   -492.375     1.00     1.00     1.00     0.00     41.00
   32   -93.6692    1.00000     14.611   -566.703     1.00     1.00     1.00     0.00     44.00
   33   -93.6692    1.00000     -0.127   -586.438     1.00     1.00     1.00     0.00     47.00
   34   -93.6692    1.00000     21.029   -620.977     1.00     1.00     1.00     0.00     50.00
   35   -93.6692    1.00000     21.205   -708.150     1.00     1.00     1.00     0.00     53.00
   36   -93.6692    1.00000     28.710   -735.140     1.00     1.00     1.00     0.00     56.00
   37   -93.6692    1.00000     34.936   -741.670     1.00     1.00     1.00     0.00     59.00
   38   -93.6692    1.00000     41.539   -748.414     1.00     1.00     1.00     0.00     62.00
   39   -93.6692    1.00000     42.722   -771.160     1.00     1.00     1.00     0.00     65.00
   40   -93.6692    1.00000     44.463   -809.333     1.00     1.00     1.00     0.00     68.00

* generalise parsing logic to also work for AreTomo v1.3.0 files, add example file and test

* add EOF
@alisterburt
Copy link
Collaborator

thanks for this @EuanPyle ! Have updated a little bit and added a test, gonna merge and push a release :)

@alisterburt alisterburt merged commit 5455703 into main Nov 1, 2022
@alisterburt alisterburt deleted the fix_aln_file_read_for_v1.3 branch November 1, 2022 17:14
@alisterburt alisterburt changed the title Search for correct columns, if not found is because v>=1.3 so look ag… Add compatibility for AreTomo v1.3.0 aln files Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants