Portable Microhaplotype Object (PMO)
  • Home
  • Format Info
    • Development of Format
    • PMO fields overview
    • PMO Examples
    • Format Overview For Developers
  • Tools Installation
    • pmotools-python installation
  • pmotools-python usages
    • Command line interface

    • pmotools-runner.py
    • Command line interface to pmotools-python with pmotools-runner.py
    • Extracting out of PMO
    • Extracting allele tables using pmotools-python
    • Subset PMO
    • Subsetting from a PMO using pmotools-python
    • Getting sub info from PMO
    • Getting basic info out of PMO using pmotools-python
    • Getting panel info out of PMO using pmotools-python
    • Handling Multiple PMOs
    • Handling multiple PMOs pmotools-python

    • Python interface
    • Getting basic info out of a PMO
    • Creating a PMO File
  • Resources
    • References

Contents

  • Format overview
  • Python implementation
  • Tools
  • From GEM meeting

Format Overview For Developers

Format overview

PMO PMO BioMethod_NODE BioMethodtypelistorsingle valuefieldsrequiredstringsingleprogram_versionstringsingleprogramoptionalstringlistadditional_argumentstringsingleprogram_description BioinformaticsMethodInfo_NODE BioinformaticsMethodInfotypelistorsingle valuefieldsrequiredBioMethodsingledemultiplexing_methodBioMethodsingledenoising_methodoptionalBioMethodlistadditional_methodsstringsinglebioinformatics_method_name BioinformaticsMethodInfo_NODE:additional_methods->BioMethod_NODE:BioMethod BioinformaticsMethodInfo_NODE:demultiplexing_method->BioMethod_NODE:BioMethod BioinformaticsMethodInfo_NODE:denoising_method->BioMethod_NODE:BioMethod BioinformaticsRunInfo_NODE BioinformaticsRunInfotypelistorsingle valuefieldsrequiredintegersinglebioinformatics_methods_idstringsinglerun_dateoptionalstringsinglebioinformatics_run_name ExperimentInfo_NODE ExperimentInfotypelistorsingle valuefieldsrequiredintegersinglesequencing_info_idintegersinglespecimen_idintegersinglepanel_idstringsingleexperiment_sample_nameoptionalstringsingleaccessionPlateInfosingleextraction_plate_infoPlateInfosinglesequencing_prep_plate_info PlateInfo_NODE PlateInfotypelistorsingle valuefieldsrequiredoptionalintegersingleplate_colstringsingleplate_namestringsingleplate_row ExperimentInfo_NODE:extraction_plate_info->PlateInfo_NODE:PlateInfo ExperimentInfo_NODE:sequencing_prep_plate_info->PlateInfo_NODE:PlateInfo GenomeInfo_NODE GenomeInfotypelistorsingle valuefieldsrequiredstringsinglenamestringsinglegenome_versionintegersingletaxon_idstringsingleurloptionalstringlistchromosomesstringsinglegff_url GenomicLocation_NODE GenomicLocationtypelistorsingle valuefieldsrequiredintegersinglegenome_idstringsinglechromintegersinglestartintegersingleendoptionalstringsingleref_seqstringsinglestrand MarkerOfInterest_NODE MarkerOfInteresttypelistorsingle valuefieldsrequiredGenomicLocationsinglemarker_locationoptionalstringlistassociations MarkerOfInterest_NODE:marker_location->GenomicLocation_NODE:GenomicLocation MaskingInfo_NODE MaskingInfotypelistorsingle valuefieldsrequiredintegersingleseq_startintegersingleseq_segment_sizeintegersinglereplacement_size MicrohaplotypeForTarget_NODE MicrohaplotypeForTargettypelistorsingle valuefieldsrequiredintegersinglemhap_idintegersinglereadsoptionalintegersingleumis MicrohaplotypesDetected_NODE MicrohaplotypesDetectedtypelistorsingle valuefieldsrequiredintegersinglebioinformatics_run_idMicrohaplotypesForSamplelistexperiment_samples MicrohaplotypesForSample_NODE MicrohaplotypesForSampletypelistorsingle valuefieldsrequiredintegersingleexperiment_sample_idMicrohaplotypesForTargetlisttarget_results MicrohaplotypesDetected_NODE:experiment_samples->MicrohaplotypesForSample_NODE:MicrohaplotypesForSample MicrohaplotypesForTarget_NODE MicrohaplotypesForTargettypelistorsingle valuefieldsrequiredintegersinglemhaps_target_idMicrohaplotypeForTargetlisthaps MicrohaplotypesForSample_NODE:target_results->MicrohaplotypesForTarget_NODE:MicrohaplotypesForTarget MicrohaplotypesForTarget_NODE:haps->MicrohaplotypeForTarget_NODE:MicrohaplotypeForTarget PanelInfo_NODE PanelInfotypelistorsingle valuefieldsrequiredReactionInfolistreactionsstringsinglepanel_name ReactionInfo_NODE ReactionInfotypelistorsingle valuefieldsrequiredintegerlistpanel_targetsstringsinglereaction_name PanelInfo_NODE:reactions->ReactionInfo_NODE:ReactionInfo ParasiteDensity_NODE ParasiteDensitytypelistorsingle valuefieldsrequiredstringsinglemethodnumbersingledensity PmoGenerationMethod_NODE PmoGenerationMethodtypelistorsingle valuefieldsrequiredstringsingleprogram_versionstringsingleprogram_name PmoHeader_NODE PmoHeadertypelistorsingle valuefieldsrequiredstringsinglepmo_versionoptionalstringsinglecreation_datePmoGenerationMethodsinglegeneration_method PmoHeader_NODE:generation_method->PmoGenerationMethod_NODE:PmoGenerationMethod PortableMicrohaplotypeObject_NODE PortableMicrohaplotypeObjecttypelistorsingle valuefieldsrequiredExperimentInfolistexperiment_infoSpecimenInfolistspecimen_infoSequencingInfolistsequencing_infoPanelInfolistpanel_infoTargetInfolisttarget_infoGenomeInfolisttargeted_genomesRepresentativeMicrohaplotypessinglemicrohaplotypes_infoBioinformaticsMethodInfolistbioinformatics_methods_infoBioinformaticsRunInfolistbioinformatics_run_infoMicrohaplotypesDetectedlistmicrohaplotypes_detectedPmoHeadersinglepmo_headeroptionalReadCountsByStagelistread_counts_by_stage PortableMicrohaplotypeObject_NODE:bioinformatics_methods_info->BioinformaticsMethodInfo_NODE:BioinformaticsMethodInfo PortableMicrohaplotypeObject_NODE:bioinformatics_run_info->BioinformaticsRunInfo_NODE:BioinformaticsRunInfo PortableMicrohaplotypeObject_NODE:experiment_info->ExperimentInfo_NODE:ExperimentInfo PortableMicrohaplotypeObject_NODE:targeted_genomes->GenomeInfo_NODE:GenomeInfo PortableMicrohaplotypeObject_NODE:microhaplotypes_detected->MicrohaplotypesDetected_NODE:MicrohaplotypesDetected PortableMicrohaplotypeObject_NODE:panel_info->PanelInfo_NODE:PanelInfo PortableMicrohaplotypeObject_NODE:pmo_header->PmoHeader_NODE:PmoHeader ReadCountsByStage_NODE ReadCountsByStagetypelistorsingle valuefieldsrequiredintegersinglebioinformatics_run_idReadCountsByStageForExperimentalSamplelistread_counts_by_experimental_sample_by_stage PortableMicrohaplotypeObject_NODE:read_counts_by_stage->ReadCountsByStage_NODE:ReadCountsByStage RepresentativeMicrohaplotypes_NODE RepresentativeMicrohaplotypestypelistorsingle valuefieldsrequiredRepresentativeMicrohaplotypesForTargetlisttargets PortableMicrohaplotypeObject_NODE:microhaplotypes_info->RepresentativeMicrohaplotypes_NODE:RepresentativeMicrohaplotypes SequencingInfo_NODE SequencingInfotypelistorsingle valuefieldsrequiredstringsinglesequencing_info_namestringsingleseq_platformstringsingleseq_instrument_modelstringsingleseq_datestringsinglelibrary_layoutstringsinglelibrary_strategystringsinglelibrary_sourcestringsinglelibrary_selectionoptionalstringsinglelibrary_kitstringsinglelibrary_screenstringsinglenucl_acid_ampstringsinglenucl_acid_amp_datestringsinglenucl_acid_extstringsinglenucl_acid_ext_datestringsinglepcr_condstringsingleseq_center PortableMicrohaplotypeObject_NODE:sequencing_info->SequencingInfo_NODE:SequencingInfo SpecimenInfo_NODE SpecimenInfotypelistorsingle valuefieldsrequiredstringsinglespecimen_nameintegerlistspecimen_taxon_idintegersinglehost_taxon_idstringsinglecollection_datestringsinglecollection_countrystringsingleproject_nameoptionalstringlistalternate_identifiersstringsinglecollector_chief_scientiststringlistdrug_usagestringsingleenv_broad_scalestringsingleenv_local_scalestringsingleenv_mediumstringsinglegeo_admin1stringsinglegeo_admin2stringsinglegeo_admin3numbersinglehost_agestringsinglehost_sexintegersinglehost_subject_idstringsinglelat_lonParasiteDensitylistparasite_density_infoPlateInfosingleplate_infostringsinglespecimen_collect_devicestringlistspecimen_commentsstringsinglespecimen_store_locstringsinglespecimen_typestringlisttravel_out_six_month PortableMicrohaplotypeObject_NODE:specimen_info->SpecimenInfo_NODE:SpecimenInfo TargetInfo_NODE TargetInfotypelistorsingle valuefieldsrequiredstringsingletarget_namePrimerInfolistforward_primersPrimerInfolistreverse_primersoptionalstringsinglegene_nameGenomicLocationsingleinsert_locationMarkerOfInterestlistmarkers_of_intereststringlisttarget_attributes PortableMicrohaplotypeObject_NODE:target_info->TargetInfo_NODE:TargetInfo PrimerInfo_NODE PrimerInfotypelistorsingle valuefieldsrequiredstringsingleseqoptionalGenomicLocationsinglelocation PrimerInfo_NODE:location->GenomicLocation_NODE:GenomicLocation ReadCountsByStageForExperimentalSample_NODE ReadCountsByStageForExperimentalSampletypelistorsingle valuefieldsrequiredintegersingleexperiment_sample_idintegersingletotal_raw_countoptionalReadCountsByStageForTargetlistread_counts_for_targets ReadCountsByStage_NODE:read_counts_by_experimental_sample_by_stage->ReadCountsByStageForExperimentalSample_NODE:ReadCountsByStageForExperimentalSample ReadCountsByStageForTarget_NODE ReadCountsByStageForTargettypelistorsingle valuefieldsrequiredintegersingletarget_idStageReadCountsliststages ReadCountsByStageForExperimentalSample_NODE:read_counts_for_targets->ReadCountsByStageForTarget_NODE:ReadCountsByStageForTarget StageReadCounts_NODE StageReadCountstypelistorsingle valuefieldsrequiredintegersingleread_countstringsinglestage ReadCountsByStageForTarget_NODE:stages->StageReadCounts_NODE:StageReadCounts RepresentativeMicrohaplotype_NODE RepresentativeMicrohaplotypetypelistorsingle valuefieldsrequiredstringsingleseqoptionalstringlistalt_annotationsMaskingInfolistmaskingstringsinglemicrohaplotype_namestringsinglepseudocigarstringsinglequality RepresentativeMicrohaplotype_NODE:masking->MaskingInfo_NODE:MaskingInfo RepresentativeMicrohaplotypesForTarget_NODE RepresentativeMicrohaplotypesForTargettypelistorsingle valuefieldsrequiredintegersingletarget_idRepresentativeMicrohaplotypelistmicrohaplotypes RepresentativeMicrohaplotypes_NODE:targets->RepresentativeMicrohaplotypesForTarget_NODE:RepresentativeMicrohaplotypesForTarget RepresentativeMicrohaplotypesForTarget_NODE:microhaplotypes->RepresentativeMicrohaplotype_NODE:RepresentativeMicrohaplotype SpecimenInfo_NODE:parasite_density_info->ParasiteDensity_NODE:ParasiteDensity SpecimenInfo_NODE:plate_info->PlateInfo_NODE:PlateInfo TargetInfo_NODE:insert_location->GenomicLocation_NODE:GenomicLocation TargetInfo_NODE:markers_of_interest->MarkerOfInterest_NODE:MarkerOfInterest TargetInfo_NODE:forward_primers->PrimerInfo_NODE:PrimerInfo TargetInfo_NODE:reverse_primers->PrimerInfo_NODE:PrimerInfo

Python implementation

Linkml generates a datamodel file with all classes: https://github.com/PlasmoGenEpi/portable-micorhaplotype-object/blob/main/src/plasmo_tar_amp_schema/datamodel/plasmo_tar_amp_schema.py

Tools

Started development of a tool called pmotools. Python implementation can be found here: https://github.com/PlasmoGenEpi/pmotools-python/tree/develop

From GEM meeting

Source Code
---
title: "Format Overview For Developers"
---

```{r setup, echo=FALSE}
source("../common.R")

#' Check sharing and unqiue values between two vectors
#'
#' @param vectorA the first vector
#' @param vectorB the second vector
#'
#' @returns a list with 4 vectors, "only_in_vectorA" unique to vectorA, "only_in_vectorB" unique to vectorB, "shared_samples" shared between both vectorA and vectorB, "all" all values by combinng vectorA and vectorB 
set_decompose <- function(vectorA, vectorB){
  ret = list()
  # Find unique and shared samples
  ret[["only_in_vectorA"]] <- setdiff(vectorA, vectorB)  # Samples only in vectorA
  ret[["only_in_vectorB"]] <- setdiff(vectorB, vectorA)  # Samples only in vectorB
  ret[["shared_samples"]] <- intersect(vectorA, vectorB) # Samples shared between vectorA and vectorB
  ret[["all"]] <- union(vectorA, vectorB) # All samples between vectorA and vectorB
  return(ret)
}
```


# Format overview 

:::{.column-screen}

```{r, echo=FALSE, results="asis"}
cat(readr::read_lines("portable_microhaplotype_object.schema.dot.svg", skip = 6), sep = "\n")
```
<!-- ![](portable_microhaplotype_object.schema.dot.svg) -->

:::


# Python implementation 

Linkml generates a datamodel file with all classes: <https://github.com/PlasmoGenEpi/portable-micorhaplotype-object/blob/main/src/plasmo_tar_amp_schema/datamodel/plasmo_tar_amp_schema.py>


# Tools  

Started development of a tool called pmotools. Python implementation can be found here: <https://github.com/PlasmoGenEpi/pmotools-python/tree/develop>




# From GEM meeting

- [ ] adding header with info on each field 
- [x] adding version to header   
- [ ] random access ability