Skip to content

Commit 772db25

Browse files
author
Ben J. Ward
committed
Ignore .DS_Store files and update docs
1 parent a936274 commit 772db25

File tree

9 files changed

+116
-27
lines changed

9 files changed

+116
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
*.jl.mem
44
/docs/build
55
/docs/site/
6+
.DS_Store

.travis.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ os:
55
- osx
66
julia:
77
- 0.7
8+
- 1.0
89
- nightly
910
matrix:
1011
allow_failures:
@@ -13,5 +14,6 @@ notifications:
1314
email: false
1415
after_success:
1516
# push coverage results to Codecov
16-
- julia -e 'cd(Pkg.dir("BioAlignments")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
17-
- julia -e 'cd(Pkg.dir("BioAlignments")); Pkg.add("Documenter"); include(joinpath("docs", "make.jl"))'
17+
- julia -e 'using Pkg; Pkg.add("Documenter"); Pkg.add("Coverage"); Pkg.add("BioAlignments"); Pkg.add("BioSequences")'
18+
- julia -e 'using Coverage; import BioAlignments; cd(dirname(dirname(pathof(BioAlignments)))); Codecov.submit(Codecov.process_folder())'
19+
- julia --color=yes -e 'import BioAlignments; cd(dirname(dirname(pathof(BioAlignments)))); include(joinpath("docs", "make.jl"))'

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ check out the master branch to try new features before release.
3030

3131
## Testing
3232

33-
BioAlignments is tested against julia `0.6` and current `0.7-dev` on
34-
Linux, OS X, and Windows.
33+
BioAlignments is tested against julia `0.7` and `1.X` on Linux, OS X, and Windows.
3534

3635
| **Latest release** | **Latest build status** |
3736
|:------------------:|:-----------------------:|

docs/make.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ makedocs(
1616
)
1717
deploydocs(
1818
repo = "github.com/BioJulia/BioAlignments.jl.git",
19-
julia = "0.6",
19+
julia = "1.0",
2020
osname = "linux",
2121
target = "build",
2222
deps = nothing,

docs/src/alignments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ julia> Alignment([
8181
AlignmentAnchor(4, 8, OP_MATCH),
8282
AlignmentAnchor(4, 12, OP_DELETE)
8383
])
84-
BioAlignments.Alignment:
84+
Alignment:
8585
aligned range:
8686
seq: 0-4
8787
ref: 4-12

docs/src/hts-files.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,19 +291,19 @@ For example, to create the following simple header:
291291

292292
```julia
293293
julia> a = SAM.MetaInfo("HD", ["VN" => 1.6, "SO" => "coordinate"])
294-
BioAlignments.SAM.MetaInfo:
294+
SAM.MetaInfo:
295295
tag: HD
296296
value: VN=1.6 SO=coordinate
297297

298298
julia> b = SAM.MetaInfo("SQ", ["SN" => "ref", "LN" => 45])
299-
BioAlignments.SAM.MetaInfo:
299+
SAM.MetaInfo:
300300
tag: SQ
301301
value: SN=ref LN=45
302302

303303
julia> h = SAM.Header([a, b])
304-
BioAlignments.SAM.Header(BioAlignments.SAM.MetaInfo[BioAlignments.SAM.MetaInfo:
304+
SAM.Header(SAM.MetaInfo[SAM.MetaInfo:
305305
tag: HD
306-
value: VN=1.6 SO=coordinate, BioAlignments.SAM.MetaInfo:
306+
value: VN=1.6 SO=coordinate, SAM.MetaInfo:
307307
tag: SQ
308308
value: SN=ref LN=45])
309309

@@ -314,18 +314,18 @@ header and an `IO` type:
314314

315315
```julia
316316
julia> samw = SAM.Writer(open("my-data.sam", "w"), h)
317-
BioAlignments.SAM.Writer(IOStream(<file my-data.sam>))
317+
SAM.Writer(IOStream(<file my-data.sam>))
318318

319319
```
320320

321321
To make a BAM Writer is slightly different, as you need to use a specific
322-
stream type from the [BGZFStreams](bgzfstreams) package:
322+
stream type from the [BGZFStreams][bgzfstreams] package:
323323

324324
```julia
325325
julia> using BGZFStreams
326326

327327
julia> bamw = BAM.Writer(BGZFStream(open("my-data.bam", "w"), "w"))
328-
BioAlignments.BAM.Writer(BGZFStreams.BGZFStream{IOStream}(<mode=write>))
328+
BAM.Writer(BGZFStreams.BGZFStream{IOStream}(<mode=write>))
329329

330330
```
331331

docs/src/index.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/src/index.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# BioAlignments
2+
3+
[![Latest release](https://img.shields.io/github/release/BioJulia/BioAlignments.jl.svg?style=flat-square)](https://github.com/BioJulia/BioAlignments.jl/releases/latest)
4+
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg?style=flat-square)](https://github.com/BioJulia/BioAlignments.jl/blob/master/LICENSE)
5+
[![Stable documentation](https://img.shields.io/badge/docs-stable-blue.svg?style=flat-square)](https://biojulia.github.io/BioAlignments.jl/stable)
6+
[![Latest documentation](https://img.shields.io/badge/docs-latest-blue.svg?style=flat-square)](https://biojulia.github.io/BioAlignments.jl/latest/)
7+
![Lifecycle](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg?style=flat-square)
8+
[![Chat on Discord](https://img.shields.io/badge/discord-chat-blue.svg?style=flat-square&logo=discord&colorB=%237289DA)](https://discord.gg/z73YNFz)
9+
10+
11+
## Description
12+
13+
BioAlignments provides alignment algorithms, data structures, and I/O
14+
tools for SAM and BAM file formats.
15+
16+
17+
## Installation
18+
19+
Install BioAlignments from the Julia REPL:
20+
21+
```julia
22+
using Pkg
23+
add("BioAlignments")
24+
#Pkg.add("BioAlignments") for julia prior to v0.7
25+
```
26+
27+
If you are interested in the cutting edge of the development, please
28+
check out the master branch to try new features before release.
29+
30+
31+
## Testing
32+
33+
BioAlignments is tested against julia `0.7` and `1.x` on Linux, OS X, and Windows.
34+
35+
| **Latest release** | **Latest build status** |
36+
|:------------------:|:-----------------------:|
37+
| [![julia07](https://pkg.julialang.org/badges/BioAlignments_0.7.svg)](https://pkg.julialang.org/?pkg=BioAlignments) | [![travis](https://img.shields.io/travis/BioJulia/BioAlignments.jl/master.svg?label=Linux+/+macOS)](https://travis-ci.org/BioJulia/BioAlignments.jl) [![appveyor](https://ci.appveyor.com/api/projects/status/klkynmkr1tgd30gq/branch/master?svg=true)](https://ci.appveyor.com/project/Ward9250/bioalignments-jl/branch/master) [![coverage](https://codecov.io/github/BioJulia/BioAlignments.jl/coverage.svg?branch=master)](https://codecov.io/github/BioJulia/BioAlignments.jl?branch=master) |
38+
39+
40+
## Contributing
41+
42+
We appreciate contributions from users including reporting bugs, fixing
43+
issues, improving performance and adding new features.
44+
45+
Take a look at the [CONTRIBUTING](https://github.com/BioJulia/BioAlignments.jl/blob/master/CONTRIBUTING.md) file provided with
46+
every BioJulia package package for detailed contributor and maintainer
47+
guidelines.
48+
49+
50+
### Financial contributions
51+
52+
We also welcome financial contributions in full transparency on our
53+
[open collective](https://opencollective.com/biojulia).
54+
Anyone can file an expense. If the expense makes sense for the development
55+
of the community, it will be "merged" in the ledger of our open collective by
56+
the core contributors and the person who filed the expense will be reimbursed.
57+
58+
59+
## Backers & Sponsors
60+
61+
Thank you to all our backers and sponsors!
62+
63+
Love our work and community? [Become a backer](https://opencollective.com/biojulia#backer).
64+
65+
[![backers](https://opencollective.com/biojulia/backers.svg?width=890)](https://opencollective.com/biojulia#backers)
66+
67+
Does your company use BioJulia? Help keep BioJulia feature rich and healthy by
68+
[sponsoring the project](https://opencollective.com/biojulia#sponsor)
69+
Your logo will show up here with a link to your website.
70+
71+
[![](https://opencollective.com/biojulia/sponsor/0/avatar.svg)](https://opencollective.com/biojulia/sponsor/0/website)
72+
[![](https://opencollective.com/biojulia/sponsor/1/avatar.svg)](https://opencollective.com/biojulia/sponsor/1/website)
73+
[![](https://opencollective.com/biojulia/sponsor/2/avatar.svg)](https://opencollective.com/biojulia/sponsor/2/website)
74+
[![](https://opencollective.com/biojulia/sponsor/3/avatar.svg)](https://opencollective.com/biojulia/sponsor/3/website)
75+
[![](https://opencollective.com/biojulia/sponsor/4/avatar.svg)](https://opencollective.com/biojulia/sponsor/4/website)
76+
[![](https://opencollective.com/biojulia/sponsor/5/avatar.svg)](https://opencollective.com/biojulia/sponsor/5/website)
77+
[![](https://opencollective.com/biojulia/sponsor/6/avatar.svg)](https://opencollective.com/biojulia/sponsor/6/website)
78+
[![](https://opencollective.com/biojulia/sponsor/7/avatar.svg)](https://opencollective.com/biojulia/sponsor/7/website)
79+
[![](https://opencollective.com/biojulia/sponsor/8/avatar.svg)](https://opencollective.com/biojulia/sponsor/8/website)
80+
[![](https://opencollective.com/biojulia/sponsor/9/avatar.svg)](https://opencollective.com/biojulia/sponsor/9/website)
81+
82+
83+
## Questions?
84+
85+
If you have a question about contributing or using BioJulia software, come
86+
on over and chat to us on [Discord](https://discord.gg/z73YNFz), or you can try the
87+
[Bio category of the Julia discourse site](https://discourse.julialang.org/c/domain/bio).

docs/src/pairalign.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cost of substitution, insertion, and deletion:
5555
julia> costmodel = CostModel(match=0, mismatch=1, insertion=1, deletion=1);
5656
5757
julia> pairalign(EditDistance(), "abcd", "adcde", costmodel)
58-
BioAlignments.PairwiseAlignmentResult{Int64,String,String}:
58+
PairwiseAlignmentResult{Int64,String,String}:
5959
distance: 2
6060
seq: 1 abcd- 4
6161
| ||
@@ -74,7 +74,7 @@ julia> s2 = dna"ACCTGGTATGATAGCG";
7474
julia> scoremodel = AffineGapScoreModel(EDNAFULL, gap_open=-5, gap_extend=-1);
7575
7676
julia> res = pairalign(GlobalAlignment(), s1, s2, scoremodel) # run pairwise alignment
77-
BioAlignments.PairwiseAlignmentResult{Int64,BioSequences.BioSequence{BioSequences.DNAAlphabet{4}},BioSequences.BioSequence{BioSequences.DNAAlphabet{4}}}:
77+
PairwiseAlignmentResult{Int64,BioSequences.BioSequence{BioSequences.DNAAlphabet{4}},BioSequences.BioSequence{BioSequences.DNAAlphabet{4}}}:
7878
score: 13
7979
seq: 0 -CCTAGG------AGGG 10
8080
||| || || |
@@ -85,7 +85,7 @@ julia> score(res) # get the achieved score of this alignment
8585
13
8686
8787
julia> aln = alignment(res)
88-
BioAlignments.PairwiseAlignment{BioSequences.BioSequence{BioSequences.DNAAlphabet{4}},BioSequences.BioSequence{BioSequences.DNAAlphabet{4}}}:
88+
PairwiseAlignment{BioSequences.BioSequence{BioSequences.DNAAlphabet{4}},BioSequences.BioSequence{BioSequences.DNAAlphabet{4}}}:
8989
seq: 0 -CCTAGG------AGGG 10
9090
||| || || |
9191
ref: 1 ACCT-GGTATGATAGCG 16
@@ -152,7 +152,7 @@ defined:
152152

153153
```jldoctest
154154
julia> EDNAFULL
155-
BioAlignments.SubstitutionMatrix{BioSymbols.DNA,Int64}:
155+
SubstitutionMatrix{BioSymbols.DNA,Int64}:
156156
A C M G R S V T W Y H K D B N
157157
A 5 -4 1 -4 1 -4 -1 -4 1 -4 -1 -4 -1 -4 -2
158158
C -4 5 1 -4 -4 1 -1 -4 -4 1 -1 -4 -4 -1 -2
@@ -177,7 +177,7 @@ For amino acids, PAM (Point Accepted Mutation) and BLOSUM (BLOcks SUbstitution M
177177

178178
```jldoctest
179179
julia> BLOSUM62
180-
BioAlignments.SubstitutionMatrix{BioSymbols.AminoAcid,Int64}:
180+
SubstitutionMatrix{BioSymbols.AminoAcid,Int64}:
181181
A R N D C Q E G H I L K M F P S T W Y V O U B J Z X *
182182
A 4 -1 -2 -2 0 -1 -1 0 -2 -1 -1 -1 -1 -2 -1 1 0 -3 -2 0 0̲ 0̲ -2 0̲ -1 0 -4
183183
R -1 5 0 -2 -3 1 0 -2 0 -3 -2 2 -1 -3 -2 -1 -1 -3 -2 -3 0̲ 0̲ -1 0̲ 0 -1 -4
@@ -244,7 +244,7 @@ important than flexibility because looking up score is faster than
244244

245245
```jldoctest
246246
julia> submat = DichotomousSubstitutionMatrix(1, -1)
247-
BioAlignments.DichotomousSubstitutionMatrix{Int64}:
247+
DichotomousSubstitutionMatrix{Int64}:
248248
match = 1
249249
mismatch = -1
250250

src/submat.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,29 +104,30 @@ function Base.show(io::IO, submat::SubstitutionMatrix{T,S}) where {T,S}
104104
for (i, x) in enumerate(alpha), (j, y) in enumerate(alpha)
105105
i′ = index(x)
106106
j′ = index(y)
107-
mat[i,j] = string(submat.data[i′,j′])
108-
if !submat.defined[i′,j′]
109-
mat[i,j] = underline(mat[i,j])
107+
mat[i, j] = string(submat.data[i′, j′])
108+
if !submat.defined[i′, j′]
109+
mat[i, j] = underline(mat[i, j])
110110
end
111111
end
112112

113113
# add rows and columns
114114
rows = map(string, alpha)
115-
cols = vcat("", rows)
115+
cols = vcat(" ", rows)
116116
mat = hcat(rows, mat)
117117
mat = vcat(reshape(cols, 1, length(cols)), mat)
118118

119119
println(io, summary(submat), ':')
120120
width = maximum(map(x -> length(x), mat))
121-
for i in 1:n+1
122-
for j in 1:n+1
123-
print(io, lpad(mat[i,j], width + 1))
121+
for i in 1:n + 1
122+
for j in 1:n + 1
123+
print(io, lpad(mat[i, j], width + ifelse(last(mat[i, j]) == '\U0332', 2, 1)))
124124
end
125125
println(io)
126126
end
127127
print(io, "(underlined values are default ones)")
128128
end
129129

130+
130131
underline(s) = join([string(c, '\U0332') for c in s])
131132

132133
# Return a vector of all symbols of `T` except the gap symbol.

0 commit comments

Comments
 (0)