Repository navigation
A8: locus IDs with commas - #12
Merged
Merged
Conversation
parse_mrd must drop commas from IDs and reject IDs that collide without them; the tutorial run with a comma in its contig name and the local FAW run must go through AutoDeep infer. Mark A8 in progress. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….csv One shared strip_commas() in mrd.py; parse_mrd raises if two IDs collide. Drop AutoDeep.sh's PDF-renaming step, unused since B1, and its TODO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TejusK123
added a commit
that referenced
this pull request
Oct 19, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A8: locus IDs with commas
Since B1,
AutoDeep inferstopped on any miRDeep2 run whose contig names contain commas, as NCBI RefSeq names often do. The S. frugiperda (FAW) training run is one: "145 loci from result.csv are not in output.mrd".Cause.
init_data.pyremoves every comma fromresult_*.csvbefore reading it, butoutput.mrdkeeps miRDeep2's IDs, e.g...._chromosome_8,_ZJU_Sfru_1.0,_whole_genome_shotgun_sequence_12098. The pypdf code worked only because miRDeep2 leaves the commas out of the PDF file names.Fix.
mrd.py: newstrip_commas().parse_mrd()uses it on every locus ID and raises an error if two IDs become identical without their commas.init_data.py: uses the samestrip_commas()onresult_*.csv, so both files follow one rule.AutoDeep.sh: removed step 4, which renamed PDFs in the working folder (nothing has read PDFs since B1), along with itsTODO: Do the same filename cleanup for .mrd file, which this PR resolves. The steps are now numbered 1/4 to 4/4.Output IDs have no commas, as before B1, so runs without commas give byte-identical output. No feature, label or Methods text changes, so there is no METHODS_CHANGES.md entry.
reanalysis.pyimports none of the changed code, so its numbers cannot move.Tests (written first; all six new checks failed before the fix)
tests/test_mrd.py:parse_mrdremoves the commas from IDs, and rejects two IDs that are identical without them.tests/test_example.py: every tutorial test now also runs on a copy whose contig name has a comma added in both files (chrII:becomeschrII,:). The output must equal the expectedxgboost_judgement.csvexactly. Runs in CI.tests/test_ids_with_commas.py(local; skipped withoutAUTODEEP_TEST_RUN, as in CI):AutoDeep inferon a copy of the FAW run gives all 145 rows oforiginal_data_FAW.csvwith the same 5' homogeneity andnum_locis.Other check (local, not a test). On FAW, every other feature also equals the training rows (145/145), folding energy included. The two exceptions are the overhangs (Bot 108/145, Top 70/145, 23 blank), which differ because B3 redefined them.
Results. Locally, with the testing folder: 136 passed. CI: see the checks below.
folding_properties.parse_mrd_file()(entropy features, never called) still keeps commas. It is left alone because it is not part of the pipeline.🤖 Generated with Claude Code