This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How convert files .psl to files .bed?

Hello, I need help.

I have a file format .psl and I want to convert it to a file format .bed (using the fields 1,2,3,4,5 and 6 of bed) using awk in ubuntu.

I have an idea of the commands that can be: awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6}' file.psl > file.bed

bed awk psl

2 answers

You could use psl2bed:

http://bedops.readthedocs.io/en/latest/content/reference/file-management/conversion/psl2bed.html

For example:

$ psl2bed < in.psl > out.bed

A: Convert BLAT to GFF file?

In that thread, I recommend replacing blat by gmap to perform mapping, gmap could output the alignment result in multiple format, including psl, gff3 and bed. So the conversion between psl and gff would no longer be needed.

GFF and BED are two different formats.

Log in to answer this question.