-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
46 lines (28 loc) · 1.8 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
bedSeq
=== USAGE ====
Usage: ./bedSeq <seqDir> <bedfilename> <bedfiletype:bed|ebed> [options] > <ofilename>
Description: append sequence to bed files (bed format for the feature coordinate, ebed format for feature block coordinates)
seqDir contains per chromosome <chr>.seq which is one line raw sequence without header. convert fa to seq file using convertFaToPureSeq.py
Options:
--output-fasta output fasta file instead of appending seq to bed file
--use-coord-as-name use coordinate as name of sequence instead of the name field of bed file. Only valid when --output-fasta option is specified
--use-block-coord-as-name use block coordinate as name. Only when --output-fasta is specified and format is ebed
=== INSTALLATION ===
compile using
bash make.sh
install into path by changing, e.g., ~/.bashrc
export PATH=${PATH}:/path/to/bedSeq/folder
=== TIPS for making seq files from fasta files (one fasta per chromosome) ===
Say you have <chr>.fa for each chromosome, e.g., chr1.fa
You can use the convertFaToPureSeq.py python script to do conversion. If it is in your path, then
for i in *.fa; do convertFaToPureSeq.py $i ${i/.fa/}.seq; done
this will make <chr>.seq for each chromosome. e.g., chr1.fa => chr1.seq
=== EXAMPLES ===
example file is top 10 lines from mm9 acembly (http://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/) bed file downlaoded from UCSC genome browser table -> mouse genome mm9 -> gene prediction track -> AceView -> acembly -> format bed
and renamed as acembly.ebed, then
head acembly.ebed > acembly.top10.ebed
---
to append sequences to the end of the bed file (assuming that you installed the seq files in the seq/ subfolder:
bedSeq seq/ acembly.top10.ebed ebed > acembly.top10.ebedseq
to get fasta files of the sequences:
bedSeq seq/ acembly.top10.ebed ebed --output-fasta > acembly.top10.fasta