Author Topic: Bedops for extracting fasta sequences from bed file  (Read 3665 times)

chudar

  • Newbie
  • *
  • Posts: 2
Bedops for extracting fasta sequences from bed file
« on: November 15, 2016, 01:16:05 PM »
Hi,

I am new to bedops and I have bed file like following
Code: [Select]
bed_file
scaffold123    56    120    transcript_A
scaffold123    175  234    transcript_A

I would like to extract the fasta sequence from the from the respective scaffold in genome.fasta with transcript header. Using bedtools this can be acheived by
Code: [Select]
bedtools getfasta -name fi genome.fasta -bed bed_file Is it possible to achieve the same output using bedops. Kindly guide me.

AlexReynolds

  • Administrator
  • Jr. Member
  • *****
  • Posts: 72
Re: Bedops for extracting fasta sequences from bed file
« Reply #1 on: November 15, 2016, 09:38:36 PM »
BEDOPS works with BED files and leaves work on FASTA files to other toolkits.

If you're looking for an alternative to bedtools, you might investigate samtools faidx.

Some examples here:

https://www.biostars.org/p/183629/#183633
https://www.biostars.org/p/98725/#98733
« Last Edit: November 15, 2016, 10:15:39 PM by AlexReynolds »