---
name: perturb-seqr
description: Connectivity-map drug and gene-perturbation search with Perturb-Seqr — finding perturbations that reverse (candidate therapeutics) or mimic a patient or subtype signature via find_patient_drugs / run_perturbseqr.
---

# Perturb-Seqr

Perturb-Seqr (https://perturbseqr.maayanlab.cloud) integrates 9 small-molecule and 7 gene-perturbation connectivity maps. These include LINCS L1000, Tahoe-100M, CMAP, SciPlex, the Replogle Perturb-seq screens and CREEDS. It scores perturbation signatures against an up/down query with Fisher's exact test.

## Modes

- **Reversers**: perturbations whose up genes overlap the query's down genes and vice versa. These are candidate therapeutics.
- **Mimickers**: perturbations that reproduce the query signature. They hint at driver genes and pathways.

## Using the tools

- Use `find_patient_drugs(cohort, patient_id, layer, method)` for a single patient. It reads the patient's up and down GMT sets for that layer and method (default limma-voom for transcriptomics). Phosphoproteomics sets have no direction, so use transcriptomics or proteomics.
- Use `run_perturbseqr(up_genes, down_genes)` for a subtype or a custom selection.

## Linking to the full results

- Both tools return `url`, a link to the paired up/down results page in the Perturb-Seqr app for the exact signature that was searched. Always include it so users can explore every hit, filter by library and see the overlapping genes.
- If `url` is just the Perturb-Seqr home page (`https://perturbseqr.maayanlab.cloud/`), the results link could not be created. Still report the hits, and say that the link goes to the home page only.

Outside these tools, for example when you call the Perturb-Seqr GraphQL API (`https://perturbseqr.maayanlab.cloud/graphql`) directly, build the link the same way the Perturb-Seqr search form does:

1. Save the up genes and the down genes as two separate user gene sets with the `addUserGeneSet` mutation. Each call returns a gene-set id (a UUID). The description is optional and labels the set in the app.

   ```graphql
   mutation AddUserGeneSet($genes: [String], $description: String = "") {
     addUserGeneSet(input: {genes: $genes, description: $description}) {
       userGeneSet { id }
     }
   }
   ```

2. Open `https://perturbseqr.maayanlab.cloud/enrichpair?dataset=<up id>&dataset=<down id>`. Repeat the `dataset` parameter, with the **up** id first and the **down** id second; swapping them swaps mimickers and reversers. Build the query string with a URL encoder (for example `URLSearchParams`) rather than by hand.
3. Optionally, add `libraries=<name>,<name>` to restrict the page to some libraries. Use the library names from the app.

Notes:
- Each list must have 1 to 3,000 genes; the app's form rejects anything outside that range.
- Saved sets are stored on the Perturb-Seqr server, and anyone with an id can read that set's genes and description without logging in. Keep descriptions to public identifiers such as cohort, patient and layer ids, and never include sensitive text.
- To check a link, query `userGeneSet(id: "<id>") { description genes }`.

## Interpreting results

- `kind` is `drug` or `gene`, and comes from the library the hit was found in. Drug libraries include LINCS L1000 CP, Tahoe-100M, NIBR DRUG-seq, CMAP, Ginkgo, SciPlex, DeepCover MoA and RummaGEO Chem. Gene libraries include LINCS L1000 XPR, Perturb Atlas, Replogle Perturb-seq, CREEDS Gene and RummaGEO Gene. Gene hits are knockouts or knockdowns: a gene reverser suggests that inhibiting that gene may counter the tumor program.
- Prefer hits that are FDA-approved (`fda_approved`) and that recur across libraries.
- Report the perturbation, library, adjusted p-value and overlap.
- These are hypotheses from transcriptional similarity. They are not treatment recommendations.
