Skip to main content
Purna can write and execute Python and R code for analyses that go beyond built-in tools. When you request custom analysis, Purna provisions a private compute server for your chat session, writes code, runs it, and returns the results without requiring you to leave the conversation.

Why use Code Execution?

Built-in tools handle common searches, summaries, and simple charts. Code Execution is for analyses that require custom logic, statistics, file processing, or figures that go beyond standard chart types.

How it works

1

You ask for an analysis

Describe what you need in plain language. Reference any files with @. For example: “Use @counts.tsv and @metadata.csv to run differential expression and create a volcano plot.”
2

Purna provisions a private server

A compute server is created and attached to your chat session. This server is private to you.
3

Relevant files are made available

Referenced uploads and generated files are copied into the server workspace so code can read them directly.
4

Code is written and executed

Purna writes Python or R code, executes it on the server, and streams results back into chat. Results can include text output, tables, charts, images, and downloadable files.
5

Server persists for follow-ups

The server stays attached to the chat session. Follow-up requests can reuse variables, intermediate results, and files from earlier executions.
The server automatically pauses when not in use and shuts down after inactivity. You are billed only for active server usage. See Usage for details.

Available libraries

Your compute server comes pre-loaded with a scientific computing environment.

Python

R

R is supported as an execution language with access to common statistical and bioinformatics packages.

System tools

Common command-line tools such as samtools, bcftools, bedtools, and tabix are available for genomic and file-processing workflows.

Working with files

Reference files with @ in your prompt. Purna makes those files available in the compute workspace and writes code against the actual file paths. Good prompts include:
  • The file or files to use
  • The columns or metadata that matter
  • The comparison or transformation you want
  • The desired output format
  • Any statistical thresholds or plotting preferences
Example:

Examples

Heatmaps and clustered visualizations

Ask for heatmaps, clustered matrices, pathway score heatmaps, or feature-by-sample plots. Try: “Create a clustered heatmap of the top 50 variable genes in @expression_matrix.tsv.”

Advanced filtering and categorization

Use code when filtering requires multi-condition logic or custom scoring. Try: “Filter @screen_results.csv for hits with effect size > 1.5, FDR < 0.05, and replicate consistency above 0.8. Return a ranked table.”

Statistical analysis

Run tests, models, confidence intervals, or enrichment calculations. Try: “Run a Fisher’s exact test comparing pathway membership between the high-response and low-response groups in @annotations.csv.”

Publication-quality figures

Generate multi-panel figures, violin plots, swarm plots, annotated scatter plots, and exportable PNG or SVG files. Try: “Create a violin plot of expression grouped by treatment condition, with significance annotations and a colorblind-safe palette.”

Data transformation

Convert, clean, merge, or reshape files for downstream analysis. Try: “Merge @sample_metadata.csv with @qc_metrics.tsv by sample ID and export a cleaned table.”

Billing

Code Execution uses a private compute server provisioned on demand.
  • Server time is counted while the server is actively running code.
  • Paused servers do not incur runtime charges.
  • Idle shutdown frees resources after inactivity.
Usage details are available in account settings.
Each chat session gets its own server. Starting a new chat creates a new server. Returning to an existing chat can resume the same server state when available.

Tips for best results

Reference files explicitly

Use @filename so Purna knows exactly which data to load.

Be specific about output

Tell Purna whether you want a table, plot, statistical result, script, or downloadable file.

Iterate in the same chat

Follow-up requests can reuse the same server state. Ask Purna to adjust plots, rerun filters, or export additional formats.

Use jobs for long workflows

For multi-step pipelines or runs longer than a quick analysis, use Jobs instead.