Question: converting txt to bed
1
gravatar for F
2.4 years ago by
F3.0k
Iran
F3.0k wrote:

i have this txt file by pasting different columns now how i can convert that to bed please because i need a bed then sorting that

i used

[izadi@lbox161 merged_asmribo]$ cut -f 1,2,3,4,5,6 main.txt > main.bed
cut: fields and positions are numbered from 1
Try 'cut --help' for more information.

 FLP1    252    1523
  RAF1    3271    3816
  REP1    1887    3008
  REP2    5308    6198
  YAL069W    335    649
  YAL068W-A    538    792
  YAL067W-A    2480    2707
  YAL066W    10092    10400
  YAL064W-B    12047    12427
  YAL064W    21526    21852

rna-seq • 1.7k views
ADD COMMENTlink modified 2.3 years ago by Biostar ♦♦ 20 • written 2.4 years ago by F3.0k
1

What you pasted looks like BED file already.
 

ADD REPLYlink written 2.4 years ago by Devon Ryan79k
1

Devon Ryan is right, your file already looks like a bed file. Are you expecting something different? Perhaps something like:

chr1    252    1523    FLP1
chr2    3271    3816    RAF1
ADD REPLYlink written 2.4 years ago by h.mon15k
1
gravatar for biocyberman
2.4 years ago by
biocyberman650
Denmark
biocyberman650 wrote:

This requires rather a simple text manipulation trick. The key is that you need to know exactly what you want as a BED file. Read more about BED format here: https://genome.ucsc.edu/FAQ/FAQformat.html#format1

ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by biocyberman650

thank you all, i need gene name, start, end, mapping quality 

ADD REPLYlink written 2.4 years ago by F3.0k
1

You'll need to show what you have to start with. If it's what you posted then you can't add the mapping quality, because you don't know it.

ADD REPLYlink written 2.4 years ago by Devon Ryan79k

yes you all right thank you, actually i pasted different columns from merged.gtf resulted by cuffmerge to use as a bed contains gene name, start, end for using in biophysconnector package for binning the reads are being mapped on genes

ADD REPLYlink written 2.4 years ago by F3.0k
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: 1596 users visited in the last hour