![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Updated How to convert .txt file to .bed .GFF or .BAR file format, | forevermark4 | Bioinformatics | 2 | 06-30-2014 06:02 AM |
Is there a BED file format validator? Does a BED file have to be sorted position? | LauraSmith | Bioinformatics | 3 | 05-21-2013 12:54 PM |
convert vcf into bed format | nans_bn | Bioinformatics | 0 | 08-02-2011 12:34 AM |
How to convert BED format to SAM/BAM? | seq_newbie | Bioinformatics | 1 | 06-23-2011 09:11 AM |
Help convert maq map format to eland format | hard998 | Bioinformatics | 0 | 07-20-2009 08:37 PM |
![]() |
|
Thread Tools |
![]() |
#1 |
Junior Member
Location: PA Join Date: Jan 2011
Posts: 3
|
![]()
I have file in the following format. I want to use MACS but it requires bed format how can I convert my file to bed format
HWUSI-EAS230-R 1 2 4 713 1086 0 1 ACAAGTTACATAACCTCCCTGATATTATGAACCCAA aaabaaab`baaa``aa_`aa`aaaaaaaaa\^_`a c3.fa 188833058 R 36 118 Thanks, |
![]() |
![]() |
![]() |
#2 |
Junior Member
Location: Ohio Join Date: Dec 2010
Posts: 9
|
![]()
The following awk script converts sorted file to BED format that has 4 fields. You can update the script as you need...
# sortedToBed.awk # Input : SORTED FILE # Output : <Chromosome> <start position> <stop position> <strand> # Usage # awk -f sortedToBed.awk SORTED_INPUT_FILE_NAME > BED_OUTPUT_FILE_NAME {OFS=" "; len=length($9); split($11, ref_chr, "."); if ($13=="F") strand = "+"; else if($13=="R") strand = "-"; else strand = "None"; if (strand!="None") print ref_chr[1], $12, $12+len, strand ; } Good Luck! Selen |
![]() |
![]() |
![]() |
Thread Tools | |
|
|