Skip to content

Conversation

@tives82
Copy link
Contributor

@tives82 tives82 commented Apr 23, 2025

adding Python script to General_LW_scripts repo to import influenza sequencing results into labware 8

adding Python script to import influenza sequencing results into labware 8
@tives82 tives82 requested review from erinyoung and jwarnn April 23, 2025 16:33
@tives82
Copy link
Contributor Author

tives82 commented Apr 24, 2025

I've updated the script and it should be good for review now. Below you will find a summary of the changes that I made from the previous script.
To test it out, make sure you run the script within the flu directory and that the SampleSheet.csv file has been copied over from the run.

Required Files:
- SampleSheet.csv
- summary_report.tsv (walkercreek workflow output found in the 'SUMMARY_REPORT' directory)

Usage:
python influenza_labware8.py -r <summary_report.tsv> -s <SampleSheet.csv>

Changes:

  • Improved filtering logic to exclude FLUSeq samples not found in summary_report.tsv from all output files (individual .txt, merged .txt, and summary .csv). This will also help find samples that failed sequencing or failed to produce viable fastq files.

  • Now writes*missing LIMS_TEST_IDs to a separate *_missing_ids.txt file.

  • Handles missing or partial clade column to avoid KeyError, assigning "No Nextclade Clade Detected" when necessary

  • Ensures WGS Organism is set to "Influenza" for all included samples

  • More robust handling of null values in IRMA fields (type, subtype, QC)

  • Minor formatting/consistency fixes in logging and output

@erinyoung
Copy link
Member

Can you add instructions and usage to the main readme as well?

@tives82
Copy link
Contributor Author

tives82 commented Apr 25, 2025

I've updated the readme with made a small correction to the script name within the usage section.

Copy link
Contributor

@jwarnn jwarnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except for the lack of individual files, this script and the README make sense to me. Once you update the script so the individual files are created then I will approve PR.

Copy link
Contributor

@jwarnn jwarnn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now that I realize the individual txt files are in sub directory of the output folder.

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.

4 participants