Targeted Therapy Directed by Genetic Testing in Treating Pediatric Patients With Relapsed or Refractory Advanced Solid Tumors, Non-Hodgkin Lymphomas, or Histiocytic Disorders (The Pediatric MATCH Screening Trial)

This Pediatric MATCH screening and multi-sub-study phase II trial studies how well treatment that is directed by genetic testing works in pediatric patients with solid tumors, non-Hodgkin lymphomas, or histiocytic disorders that have progressed following at least one line of standard systemic therapy and/or for which no standard treatment exists that has been shown to prolong survival. Genetic tests look at the unique genetic material (genes) of patients' tumor cells. Patients with genetic changes or abnormalities (mutations) may benefit more from treatment which targets their tumor's particular genetic mutation, and may help doctors plan better treatment for patients with solid tumors or non-Hodgkin lymphomas.

PRIMARY OBJECTIVES:

I. To utilize clinical and biological data to screen for eligibility to phase 2 pathway-targeting specific subprotocols of pathway-targeting agents in pediatric patients with advanced solid tumors, non-Hodgkin lymphomas, and histiocytic disorders.

II. To determine the proportion of pediatric patients whose advanced tumors have pathway alterations that can be targeted by select anti-cancer drugs. (Completed) III. To determine the objective response rates (ORR; complete response + partial response) in pediatric patients with advanced solid tumors, non-Hodgkin lymphomas, and histiocytic disorders harboring a priori specified genomic alterations treated with pathway-targeting agents.

SECONDARY OBJECTIVES:

I. To estimate the progression free survival in pediatric patients receiving targeted therapies for advanced solid tumors, non-Hodgkin lymphomas, and histiocytic disorders.

II. To obtain preliminary or additional information about the tolerability of targeted therapies in children with advanced cancers.

III. To provide preliminary estimates of the pharmacokinetics of targeted therapies in children with advanced cancers.

IV. To obtain preliminary information on the response rate to targeted therapy in patients whose tumors lack actionable alterations as defined for the molecular analysis for therapy choice (MATCH) study, for selected agents for which efficacy is observed in the primary matched cohort.

EXPLORATORY OBJECTIVES:

I. To increase knowledge of the genomic landscape of advanced pediatric solid tumors, non-Hodgkin lymphomas, and histiocytic disorders.

II. To describe the genomic changes that occur in advanced pediatric cancers between the time of initial diagnosis and relapse, in cases for which paired tumor specimens are available.

III. To explore approaches to diagnosing and profiling genomics of advanced pediatric cancers through evaluation of circulating tumor deoxyribonucleic acid (DNA).

IV. To determine the frequency and spectrum of germline cancer susceptibility mutations in children with relapsed solid tumors and non-Hodgkin lymphomas and assess the feasibility of return of those results in the National Clinical Trial Network (NCTN) group setting.

OUTLINE:

STEP 1 (SCREENING): Patients undergo biopsy along with tumor mutational screening of the biopsy material for specific, pre-defined mutations, amplifications, or translocations of interest via tumor sequencing and immunohistochemistry. Patients also undergo collection of blood samples for research purposes.

STEP 2 (TREATMENT): Patients with a mutation targeted by one or more of the investigational drugs used in this study or those without mutations are assigned to 1 of 10 treatment subprotocols.

APEC1621A: Patients with a NTRK1, NTRK2, or NTRK3 gene fusion receive larotrectinib sulfate orally (PO) or via nasogastric- or gastric-tube twice daily (BID) on days 1-28. Cycles repeat every 28 days for 2 years in the absence of disease progression or unacceptable toxicity.

APEC1621B: Patients with a FGFR1, FGFR2, FGFR3, or FGFR4 gene mutation receive erdafitinib PO once daily (QD) on days 1-28 of each cycle. Treatment repeats every 28 days for up to 26 cycles (2 years) in the absence of disease progression or unacceptable toxicity. Patients undergo an x-ray, computed tomography (CT scan), magnetic resonance imaging (MRI), radionuclide imaging, and/or bone scan, as well as a bone marrow aspiration and/or biopsy during screening and on study. Patients also undergo blood sample collection on study.

APEC1621C: Patients with an EZH2, SMARCB1, or SMARCA4 gene mutation receive tazemetostat PO BID on days 1-28. Cycles repeat every 28 days for 2 years in the absence of disease progression or unacceptable toxicity.

APEC1621D: Patients with a TSC1, TSC2, or PI3K/mTOR gene mutations receive PI3K/mTOR inhibitor LY3023414 PO BID on days 1-28. Cycles repeat every 28 days for 2 years in the absence of disease progression or unacceptable toxicity.

APEC1621E: Patients with an activating MAPK pathway gene mutation receive selumetinib sulfate PO BID on days 1-28. Cycles repeat every 28 days for 2 years in the absence of disease progression or unacceptable toxicity.

APEC1621F: Patients with an ALK or ROS1 gene alteration receive ensartinib (ALK Inhibitor X-396) PO BID on days 1-28. Cycles repeat every 28 days for 2 years (up to 26 cycles) in the absence of disease progression or unacceptable toxicity. Patients undergo an x-ray, CT scan, MRI, PET scan, radionuclide imaging, and/or bone scan, as well as a bone marrow aspiration and/or biopsy during screening and on study. Patients also undergo blood sample collection on study.

APEC1621G: Patients with a BRAF V600 gene mutation receive vemurafenib PO BID on days 1-28. Cycles repeat every 28 days for 2 years in the absence of disease progression or unacceptable toxicity.

APEC1621H: Patients with deleterious ATM, BRCA1, BRCA2, RAD51C, or RAD51D gene mutations receive olaparib PO BID on days 1-28. Cycles repeat every 28 days for 2 years in the absence of disease progression or unacceptable toxicity.

APEC1621I: Patients with Rb positive advanced solid tumors, non-Hodgkin lymphoma, or histiocytic disorders with activating alterations in cell cycle genes receive palbociclib PO QD on days 1-21. Cycles repeat every 28 days for up to 2 years in the absence of disease progression or unacceptable toxicity.

APEC1621J: Patients with MAPK Pathway Mutations receive ulixertinib PO BID. Cycles repeat every 28 days for up to 2 years in the absence of disease progression or unacceptable toxicity.

APEC1621M: Patients with HRAS gene alterations receive tipifarnib PO or via nasogastric or gastric tube BID on days 1-7 and 15-21. Treatment repeats every 28 days for up to 26 cycles (2 years) in the absence of disease progression or unacceptable toxicity.

APEC1621N: Patients with activating RET gene alterations receive selpercatinib PO BID on days 1-28. Treatment repeats every 28 days for up to 26 cycles (2 years) in the absence of disease progression or unacceptable toxicity. Patients may also undergo PET, CT, MRI, PET/CT, PET/MRI, and/or CT/MRI, scintigraphy, and x-ray imaging throughout the trial.

After completion of study treatment, patients are followed up periodically.

Eligibility Criteria:
Inclusion Criteria:

* ELIGIBILITY CRITERIA FOR ENROLLMENT ONTO APEC1621SC: Patients must be \>= 12 months and =\< 21 years of age at the time of study enrollment
* ELIGIBILITY CRITERIA FOR ENROLLMENT ONTO APEC1621SC: Patients with recurrent or refractory solid tumors, including non-Hodgkin lymphomas, histiocytoses (e.g. langerhans cell histiocytosis \[LCH\], juvenile xanthogranuloma \[JXG\], histiocytic sarcoma), and central nervous system (CNS) tumors are eligible; patients must have had histologic verification of malignancy at original diagnosis or relapse except in patients with intrinsic brain stem tumors, optic pathway gliomas, or patients with pineal tumors and elevations of cerebrospinal fluid (CSF) or serum tumor markers including alpha-fetoprotein or beta-human chorionic gonadotropin (HCG); in cases where patient enrolls prior to histologic confirmation of recurrent disease, patient is ineligible and should be withdrawn from study if histology fails to confirm recurrence; please note: Patients with Hodgkin lymphoma and plexiform neurofibroma are not eligible
* ELIGIBILITY CRITERIA FOR ENROLLMENT ONTO APEC1621SC: Tumor Testing Requirement: Tumor sample availability requirement for stage 1 of Pediatric MATCH (patients enrolled from start of study in July 2017 through 12/31/21); Patients must have an formalin-fixed paraffin-embedded (FFPE) tumor sample available for MATCH study testing from a biopsy or surgery that was performed at any point after initial tumor recurrence/progression, or be planned to have a procedure to obtain such a sample that is considered to be of potential benefit by the treating clinicians; a tumor sample from a clinically performed diagnostic (pre-treatment) biopsy will be acceptable for enrollment onto Pediatric MATCH only for children with high-grade gliomas of the brainstem (diffuse intrinsic pontine gliomas) or thalamus

  * Please note: Samples that have been decalcified using standardly utilized acid-based decalcification methods are not generally suitable for MATCH study testing; the nucleic acids will have been degraded in the decalcification process
* ELIGIBILITY CRITERIA FOR ENROLLMENT ONTO APEC1621SC: Tumor molecular profiling report availability requirement for Stage 2 of Pediatric MATCH (patients enrolled starting 2022): In stage 2 of the study, no tumor samples will be submitted for centralized clinical tumor profiling; instead, a tumor molecular profiling report from a College of American Pathologists (CAP)/ Clinical Laboratory Improvements Amendments (CLIA)-approved testing laboratory must be submitted for review by the Molecular Review Committee (MRC)

  * This molecular profiling must have been performed on a tumor sample that was obtained at any point after initial tumor recurrence/progression and must be accompanied by a pathology report for the same tumor specimen; a molecular profiling report for a diagnostic (pre-treatment) tumor sample will be acceptable for enrollment onto Pediatric MATCH only for children with high-grade gliomas of the brainstem (diffuse intrinsic pontine gliomas) or thalamus. In the event that molecular profiling reports are available from multiple timepoints, the most recent report should be prioritized for study submission
* ELIGIBILITY CRITERIA FOR ENROLLMENT ONTO APEC1621SC: Karnofsky \>= 50% for patients \> 16 years of age and Lansky \>= 50 for patients =\< 16 years of age); note: neurologic deficits in patients with central nervous system (CNS) tumors must have been stable for at least 7 days prior to study enrollment; patients who are unable to walk because of paralysis, but who are up in a wheelchair, will be considered ambulatory for the purpose of assessing the performance score
* ELIGIBILITY CRITERIA FOR ENROLLMENT ONTO APEC1621SC: Patients must have radiographically measurable disease; measurable disease based on imaging obtained less than or equal to 56 days prior to enrollment; patients with neuroblastoma who do not have measurable disease but have metaiodobenzylguanidine (MIBG) positive (+) evaluable disease are eligible; measurable disease in patients with CNS involvement is defined as any lesion that is at minimum 10 mm in one dimension on standard magnetic resonance imaging (MRI) or computed tomography (CT)

  * Note: The following do not qualify as measurable disease:

    * Malignant fluid collections (e.g., ascites, pleural effusions)
    * Bone marrow infiltration except that detected by MIBG scan for neuroblastoma
    * Lesions only detected by nuclear medicine studies (e.g., bone, gallium or positron emission tomography \[PET\] scans) except as noted for neuroblastoma
    * Elevated tumor markers in plasma or CSF
    * Previously radiated lesions that have not demonstrated clear progression post radiation
    * Leptomeningeal lesions that do not meet the measurement requirements for Response Evaluation Criteria in Solid Tumors (RECIST) 1.1
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: NOTE: patient does not need to meet all subprotocol criteria at time of enrollment onto the APEC1621SC screening protocol, but will need to meet all criteria prior to enrollment on any assigned treatment subprotocol. Patients must be enrolled onto a subprotocol within 2 weeks (14 days) of treatment assignment
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: Karnofsky \>= 50% for patients \> 16 years of age and Lansky \>= 50 for patients =\< 16 years of age); Note: neurologic deficits in patients with CNS tumors must have been stable for at least 7 days prior to study enrollment; patients who are unable to walk because of paralysis, but who are up in a wheelchair, will be considered ambulatory for the purpose of assessing the performance score
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: At the time of treatment with subprotocol specified therapy, the patients must have radiographically measurable disease; patients with neuroblastoma who do not have measurable disease but have MIBG+ evaluable are eligible; measurable disease in patients with CNS involvement is defined as any lesion that is at minimum 10 mm in one dimension on standard MRI or CT

  * Note: The following do not qualify as measurable disease:

    * Malignant fluid collections (e.g., ascites, pleural effusions)
    * Bone marrow infiltration except that detected by MIBG scan for neuroblastoma
    * Lesions only detected by nuclear medicine studies (e.g., bone, gallium or positron emission tomography \[PET\] scans) except as noted for neuroblastoma
    * Elevated tumor markers in plasma or CSF
    * Previously radiated lesions that have not demonstrated clear progression post radiation
    * Leptomeningeal lesions that do not meet the measurement requirements for RECIST 1.1
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: At the time of enrollment onto a subprotocol, the following general criteria for initiation of therapy will be required:

  * Patients must have fully recovered from the acute toxic effects of all prior anticancer therapy and must meet the following minimum duration from prior anticancer directed therapy prior to enrollment to the subprotocol; if after the required timeframe, the numerical eligibility criteria are met, e.g. blood count criteria, the patient is considered to have recovered adequately

    * Cytotoxic chemotherapy or other anticancer agents known to be myelosuppressive: for agents not listed, the duration of this interval must be discussed with the study chair and the study-assigned research coordinator prior to enrollment \>= 21 days after the last dose of cytotoxic or myelosuppressive chemotherapy (42 days if prior nitrosourea)
    * Anticancer agents not known to be myelosuppressive (e.g. not associated with reduced platelet or absolute neutrophil counts \[ANC\]): \>= 7 days after the last dose of agent; for agents not listed, the duration of this interval must be discussed with the study chair and the study-assigned research coordinator prior to enrollment
    * Antibodies: \>= 21 days must have elapsed from infusion of last dose of antibody, and toxicity related to prior antibody therapy must be recovered to grade =\< 1
    * Corticosteroids: If used to modify immune adverse events related to prior therapy, \>= 14 days must have elapsed since last dose of corticosteroid
    * Hematopoietic growth factors: \>= 14 days after the last dose of a long-acting growth factor (e.g. Neulasta) or 7 days for short-acting growth factor; for agents that have known adverse events occurring beyond 7 days after administration, this period must be extended beyond the time during which adverse events are known to occur; the duration of this interval must be discussed with the study chair and the study-assigned research coordinator
    * Interleukins, interferons and cytokines (other than hematopoietic growth factors): \>= 21 days after the completion of interleukins, interferon or cytokines (other than hematopoietic growth factors)
    * Stem cell infusions (with or without total-body irradiation \[TBI\]):

      * Allogeneic (non-autologous) bone marrow or stem cell transplant, or any stem cell infusion including donor lymphocyte infusion (DLI) or boost infusion: \>= 84 days after infusion and no evidence of graft versus host disease (GVHD)
      * Autologous stem cell infusion including boost infusion: \>= 42 days
    * Cellular therapy: \>= 42 days after the completion of any type of cellular therapy (e.g. modified T cells, natural killer (NK) cells, dendritic cells, etc.)
    * X-ray therapy (XRT)/External Beam Irradiation including Protons: \>= 14 days after local XRT; \>= 150 days after TBI, craniospinal XRT or if radiation to \>= 50% of the pelvis; \>= 42 days if other substantial bone marrow (BM) radiation; note: radiation may not be delivered to "measurable disease" tumor site(s) being used to follow response to subprotocol treatment
    * Radiopharmaceutical therapy (e.g., radiolabeled antibody, 131I-MIBG): \>= 42 days after systemically administered radiopharmaceutical therapy
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: For patients with solid tumors without known bone marrow involvement:

  * Peripheral absolute neutrophil count (ANC) \>= 1000/mm\^3
  * Platelet count \>= 100,000/mm\^3 (transfusion independent, defined as not receiving platelet transfusions for at least 7 days prior to enrollment)
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: Patients with known bone marrow metastatic disease will be eligible for study provided they meet the blood counts (may receive transfusions provided they are not known to be refractory to red cell or platelet transfusions); these patients will not be evaluable for hematologic toxicity
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: Creatinine clearance or radioisotope glomerular filtration rate (GFR) \>= 70 ml/min/1.73 m\^2 or a serum creatinine based on age/gender as follows:

  * Age: 1 to \< 2 years; maximum serum creatinine (mg/dL): male 0.6; female 0.6
  * Age: 2 to \< 6 years; maximum serum creatinine (mg/dL): male 0.8; female 0.8
  * Age: 6 to \< 10 years; maximum serum creatinine (mg/dL): male 1; female 1
  * Age: 10 to \< 13 years; maximum serum creatinine (mg/dL): male 1.2; female 1.2
  * Age: 13 to \< 16 years; maximum serum creatinine (mg/dL): male 1.5; female 1.4
  * Age: \>= 16 years; maximum serum creatinine (mg/dL): male 1.7; female 1.4
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: Bilirubin (sum of conjugated + unconjugated) =\< 1.5 x upper limit of normal (ULN) for age
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: Serum glutamate pyruvate transaminase (SGPT) (alanine transferase \[ALT\]) =\< 135 U/L (for the purpose of this study, the ULN for SGPT is 45 U/L)
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: Patients must be able to swallow intact capsules/tablets, unless otherwise specified in the subprotocol to which they are assigned
* GENERAL INCLUSION CRITERIA FOR SUBPROTOCOLS: Agent specific limitations on prior therapy will be included with specific treatment subprotocols

Exclusion Criteria:

* GENERAL EXCLUSION CRITERIA FOR SUBPROTOCOLS: Pregnant or breast-feeding women will not be entered on this study due to risks of fetal and teratogenic adverse events as seen in animal/human studies, or because there is currently no available information regarding human fetal or teratogenic toxicities; pregnancy tests must be obtained in females who are post-menarchal; males or females of reproductive potential may not participate unless they have agreed to use an effective contraceptive method
* GENERAL EXCLUSION CRITERIA FOR SUBPROTOCOLS: Concomitant medications

  * Corticosteroids: at the time of consent and enrollment to regimen specific subprotocols, patients receiving corticosteroids who have not been on a stable or decreasing dose of corticosteroid for at least 7 days prior to enrollment to the subprotocol will not be eligible; if used to modify immune adverse events related to prior therapy, \>= 14 days must have elapsed since last dose of corticosteroid
  * Investigational drugs: patients must meet criteria for prior therapy at the time of consent and enrollment to a subprotocol; other investigational agents may not be administered to patients while they are receiving study drug as part of a subprotocol
  * Anticancer agents: patients must meet criteria for prior therapy at the time of consent and enrollment to a subprotocol; other investigational agents may not be administered to patients while they are receiving study drug as part of a subprotocol
  * Anti-GVHD agents post-transplant: patients who are receiving cyclosporine, tacrolimus or other agents to prevent graft-versus-host disease post bone marrow transplant are not eligible
* GENERAL EXCLUSION CRITERIA FOR SUBPROTOCOLS: Patients who have an uncontrolled infection are not eligible
* GENERAL EXCLUSION CRITERIA FOR SUBPROTOCOLS: Patients who have had a prior solid organ transplant are not eligible
* GENERAL EXCLUSION CRITERIA FOR SUBPROTOCOLS: Additional agent specific criteria will be included with specific treatment subprotocols