Question: How can I change txt to bed file?
0
gravatar for opheevallee
5 weeks ago by
opheevallee0 wrote:

Forgive me, I know this question has already been asked but I ran into a few problems while trying the given methods.

So I have this text file in this format:

CACAAAGATAAAGACTTAATTAAAAACC    47564052    47564079    +   -28.27  P

CACAGTAATGAATGACTTTGCAAAGATT    47425208    47425235    +   -29.10  P

CACTGTGGTCTGCACCCTTGGTGAAATA    47344215    47344242    +   -29.13  P

CACTGAGATAAATGCAGCAACCTAAATT    47444207    47444234    +   -31.09  P

CACCCATGCACACCCCTCCGCACAAACA    47556633    47556660    -   -31.41  P

Note: there aren't actually spaces between lines it was just easier to read on Biostars if i put them here.

The first methos I tried was using> cut -f 2,3,4 cadm1.txt >cadm1.bed However, I cannot open the bed file in genome browsers such as IGV and IGB.

I also have tried using GenomeIntervals2BED python SeqGI_V1.2/scripts/GenomeIntervals2BED.py -f testfiles/cadm1.txt -c 2,3,4 --cID=1 -o testrun/cadm1.bed but keep getting "ERROR: column position (ID) has to be an integer." even though I have tried putting every column into cID ie. cID=1, cID=2 etc.

Please explain in simple terms as I am pretty new to any type of coding.

cmd sequence • 144 views
ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by opheevallee0
1

Check the BED format definition first.

ADD REPLYlink written 5 weeks ago by JC11k

Thanks, I have added a column for chromosome number.

ADD REPLYlink written 5 weeks ago by opheevallee0
1

opheevallee : Please use the formatting bar (especially the code option) to present your post better. I've done it for you this time.
code_formatting

ADD REPLYlink written 5 weeks ago by genomax89k
0
gravatar for opheevallee
5 weeks ago by
opheevallee0 wrote:

So I ended up solving the problem by recoding some lines in GenomesIntervals2BED.py, the file is pretty old and has not been updated to keep up with new programming language. I posted a fixed version on Github

ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by opheevallee0
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: 1151 users visited in the last hour