Question: Creating a bed file from a de novo fasta file
0
gravatar for c.e.chong
7 weeks ago by
c.e.chong20
c.e.chong20 wrote:

Hi all,

I need to create a bed file from my fasta files (from de novo assembled Metagenomic samples). I want the contig name in one column, then the start position and end position.

Does anyone have any advice on how to do this?

Thanks in advance!

ADD COMMENTlink written 7 weeks ago by c.e.chong20

By start position and end position, do you mean 1 and length(sequence) for each contig? You should be able to use bioawk to get that information.

ADD REPLYlink modified 7 weeks ago • written 7 weeks ago by RamRS28k

I don't want the length of the contig just the bp number where they start and end

ADD REPLYlink written 7 weeks ago by c.e.chong20

Where is that information stored in the FASTA file?

ADD REPLYlink written 7 weeks ago by RamRS28k

I’m not sure, that’s why I’m asking if it’s possible to do this as I was told this was the file I needed!

I’m not clear on what you mean by 1 and length(sequence)?

Thanks

ADD REPLYlink written 7 weeks ago by c.e.chong20

as I was told this was the file I needed

There lies the problem. I think you need to spend a little more time understanding the problem. Talk to the person who told you this and ask them for more information.

ADD REPLYlink written 7 weeks ago by RamRS28k

Thanks for your help I have a bio python script to do this now.

ADD REPLYlink written 7 weeks ago by c.e.chong20

Perhaps this would have helped with the names and lengths somewhat faster. Then adapt to BED format

samtools faidx your.fasta
cat your.fasta.fai
ADD REPLYlink written 7 weeks ago by colindaven2.3k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1373 users visited in the last hour