Skip to content

query_bedpe

Concepts

For many AQuA tool users, query_bedpe serves as the go-to secondary tool in the pipeline when addressing questions related to genomic interactions. After you’ve obtained a .bedpe file with build_bedpe, query_bedpe is the next logical step to focus on the interactions that matter most for your research.

Visualize bedpe

Let’s explore some key features and settings that make query_bedpe a versatile tool for 3G genomics research. We’ll start by visualizing an interaction in a .bedpe file.

plot_contacts

Report contact values

The purple square shows the bedpe region, and the two diagonal purple lines show the bedpe feet. Now, let’s use query_bedpe to determine contact values within our bedpe. The contact value will be printed to standard out in the 7th column.

center_bin

In the above plot, we can see that the strongest interaction (represented by the darkest color of red), is not the value that is reported when we use the default query_bedpe settings.

max_bin

That’s better! Now, how do we get those coordinates?

Update coordinates

fix

Usage

query_bedpe uses a bedpe file to calculate AQuA normalized or counts-per-million (CPM) contact values for given ranges in a sample and prints to standard out.

Usage and Option Summary

Terminal window
query_bedpe -A H3K27ac -P path/to/pairs.bedpe -G hg38

(or):

Terminal window
query_bedpe -A H3K27ac -B H3K27me3 -P path/to/pairs.bedpe -G hg38

Required

Short OptionLong OptionDescription
-P--bedpeFull path to the bedpe (pairs) file you want to query, without headers!
-A--sample_1Name of the sample you want to use as it appears on the Tinker box
-G--genomeThe genome build the sample(s) has been processed using. Strictly hg19 or hg38

Optional

Short OptionLong OptionDescription
-Q--normWhich normalization to use. Strictly ‘none’, ‘cpm’, ‘aqua’, or ‘abc’ in lower case. Non-spike-in samples default to cpm. Spike-in samples default to aqua
-B--sample_2The name of the second sample. If triggered, calculates the delta contact values for that pair. Useful in case vs control
-R--resolutionResolution of sample in base pairs. Default 5000. Accepted resolutions: 1000,5000,10000,25000,50000,100000,250000,500000,1000000,2500000
-f--formulaArithmetic to use to report contact values. Options: center, max, average, sum. Default = center
-F--fixIf FALSE, reports new coordinates based on arithmetic center or max. Default = TRUE
--expandExpands 1D bedpe feet in both directions based on supplied value (in bin units). Default = 0
-I--inherentIf TRUE, hic values transformed to inherent units. For one-sample tests only. Default = FALSE
-m--preserve_metaIf TRUE, bedpe metadata columns will be preserved. Default = TRUE
-h--helpHelp message