Load the manta output (from individual flat file) for 1 sample.

get_manta_sv_by_sample(
  this_sample_id,
  these_samples_metadata,
  force_lift = FALSE,
  return_anyway = FALSE,
  min_vaf = 0.1,
  min_score = 40,
  pass = TRUE,
  projection = "grch37",
  verbose = TRUE
)

Arguments

this_sample_id

The single sample ID you want to obtain the result from. If this parameter is not supplied, the function will retrieve sample ID from the supplied metadata table (these_samples_metadata).

these_samples_metadata

A metadata table containing metadata for this_sample_id, or sample of interest. This parameter is required.

force_lift

If TRUE, coordinates will be lifted (if needed) to the selected projection. Default is FALSE. WARNING: if your code calls this function directly, set this parameter to TRUE to ensure that the returned calls are in respect to the requested projection.

return_anyway

Set to TRUE to force variant calls to be returned, even if they're not lifted, This parameter should only ever be modified from the default setting when this function is called by another function that handles the liftOver separately.

min_vaf

The minimum tumour VAF for a SV to be returned. Default value is 0.1.

min_score

The lowest Manta somatic score for a SV to be returned. Default value is 40.

pass

If set to TRUE, only return SVs that are annotated with PASS in the FILTER column. Set to FALSE to keep all variants, regardless if they PASS the filters. Default is TRUE.

projection

The projection of returned calls. Default is grch37.

verbose

Set to FALSE to prevent the path of the requested bedpe file to be printed.

Value

a data frame containing the Manta outputs from this_sample_id in a bedpe-like format with additional columns extracted from the VCF column.

Details

This function is used for retrieving Manta results (structural variants) from individual flat-files (one sample). For multiple samples, please see get_manta_sv_by_samples (a convenience wrapper function for get_manta_sv_by_sample). Additional columns are extracted from the VCF column and standard filtering options are available. This function also performs a lift-over to selected projection, if needed. Please note, if force_lift is set to FALSE, an extra column will be added that states if the returned variant calls need to be lifted. The value for this column is returned TRUE (for all rows) if the available genome projection for the selected sample does not match the selected projection (i.e requiring the user to manually lift the calls). Is this function not what you are looking for? Try one of the following, similar, functions; get_combined_sv, get_manta_sv, get_manta_sv_by_samples

Examples

#example 1
#get manta calls for a sample that needs to be lifted to "hg38" and let this function
#take care of the liftover step for you.
my_sv = get_manta_sv_by_sample(this_sample_id = "99-27783_tumorA",
                               these_samples_metadata = get_gambl_metadata(),
                               projection = "hg38",
                               force_lift = TRUE)
#> Reading 99-27783_tumorA from: /projects/nhl_meta_analysis_scratch/gambl/results_local/gambl/manta_current/99-outputs/bedpe/genome--grch37/somaticSV/99-27783_tumorA--99-27783_normal--matched.somaticSV.bedpe
#> 99-27783_tumorA flat-file is not available in the selected projection, running liftover_bedpe...
#> 99-27783_tumorA successfully lifted to hg38

#example 2
#get manta calls based on an already filtered metadata (with one sample ID)
my_metadata = get_gambl_metadata()
my_metadata = dplyr::filter(my_metadata, sample_id=="99-27783_tumorA")

my_sv = get_manta_sv_by_sample(these_samples_metadata = my_metadata,
                               projection = "hg38",
                               force_lift = TRUE)
#> Reading 99-27783_tumorA from: /projects/nhl_meta_analysis_scratch/gambl/results_local/gambl/manta_current/99-outputs/bedpe/genome--grch37/somaticSV/99-27783_tumorA--99-27783_normal--matched.somaticSV.bedpe
#> 99-27783_tumorA flat-file is not available in the selected projection, running liftover_bedpe...
#> 99-27783_tumorA successfully lifted to hg38