Add reference sequences from a targeted FASTA onto a panel BED table
Source:R/add_ref_seqs_with_targeted_ref_fasta.R
add_ref_seqs_with_targeted_ref_fasta.RdJoins ref_seq onto a panel location table by matching FASTA record names
to target_name.
Usage
add_ref_seqs_with_targeted_ref_fasta(
ref_bed,
target_fasta,
output = NULL,
overwrite = FALSE
)Details
Inputs
ref_bed: Panel BED TSV with header (#chrom,start,end,target_name,length,strand), as a file path or data frame.target_fasta: FASTA whose record names matchtarget_name.
Outputs
output(optional):ref_bedTSV with aref_seqcolumn. IfNULL, results are returned without writing.
Running
add_ref_seqs_with_targeted_ref_fasta(
ref_bed = "ref_bed.tsv",
target_fasta = "targets.fasta",
output = "ref_bed_with_seq.tsv"
)Rscript exec/add_ref_seqs_with_targeted_ref_fasta \
--ref_bed ref_bed.tsv \
--target_fasta targets.fasta \
--output ref_bed_with_seq.tsvRequires Biostrings (Suggests) to read the FASTA.