Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting -> Format #74

Merged
merged 3 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
fail-fast: false
matrix:
version:
- '1.0'
- '1.6' # LTS
- '1' # Latest Stable Release
os:
Expand Down
19 changes: 15 additions & 4 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "MIToS"
uuid = "51bafb47-8a16-5ded-8b04-24ef4eede0b5"
version = "2.15.0"
version = "2.16.0"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
Expand All @@ -10,7 +10,7 @@ CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
FastaIO = "a0c94c4b-ebed-5953-b5fc-82fe598ac79f"
Formatting = "59287772-0a20-5a39-b81b-1366585eb4c0"
Format = "1fa38f19-a742-5d3f-a2b9-30dd87b9d5f8"
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
JSON3 = "0f8b85d8-7281-11e9-16c2-39a750bddbf1"
Expand All @@ -37,24 +37,35 @@ ArgParse = "1"
AutoHashEquals = "0.2, 1, 2"
Clustering = "0.14, 0.15"
CodecZlib = "0.6, 0.7"
Dates = "1"
DelimitedFiles = "1"
Distributed = "1"
Documenter = "0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 1"
FastaIO = "1"
Formatting = "0.4"
Format = "1"
HTTP = "0.9, 1"
JSON = "0.21"
LightXML = "0.8, 0.9"
LinearAlgebra = "1"
Logging = "1"
Markdown = "1"
NamedArrays = "=0.9.0, =0.9.1, =0.9.2, =0.9.3, =0.9.4, =0.9.5, =0.9.6"
OrderedCollections = "1.1"
PairwiseListMatrices = "0.11"
Pkg = "1"
ProgressMeter = "1"
Random = "1"
ROCAnalysis = "0.3"
RecipesBase = "1"
Requires = "1"
Serialization = "1"
Statistics = "1"
StaticArrays = "0.12, 1.0"
StatsBase = "0.32, 0.33, 0.34"
Test = "1"
TranscodingStreams = "0.9, 0.10"
JSON3 = "1"
julia = "1"
julia = "1.6"

[extras]
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Expand Down
2 changes: 1 addition & 1 deletion src/PDB/PDB.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using LightXML
using LinearAlgebra
using Statistics # mean
using MIToS.Utils
using Formatting
using Format
using JSON
using JSON3
using HTTP
Expand Down
6 changes: 3 additions & 3 deletions src/PDB/PDBParser.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ function Base.parse(io::Union{IO,String}, ::Type{PDBFile};
atom_chain = string(line[22])
atom_name = String(strip(SubString(line, 13, 16), ' '))
# PDB files generated by Foldseek have only CA atoms and no element identifier
# because they use only the first 66 columns of the file. We prefer using
# `ncodeunits` over `length` since it's faster and `line` consists solely of
# because they use only the first 66 columns of the file. We prefer using
# `ncodeunits` over `length` since it's faster and `line` consists solely of
# ASCII characters.
element = if 78 ≤ ncodeunits(line)
String(strip(SubString(line, 77, 78), ' '))
Expand Down Expand Up @@ -150,7 +150,7 @@ const _Format_PDB_ATOM = FormatExpr(
# 1 2 3 4 5 6 7 8
# 12345678901234567890123456789012345678901234567890123456789012345678901234567890
# > <> < > <|> < |> <| > <> <> <> <> < > <><><
"{:<6}{:>5d} {:<4}{:>1}{:>3} {:>1}{:>4}{:>1} {:>8.3f}{:>8.3f}{:>8.3f}{:>6.2f}{:>6.2f} {:<4}{:>2}{:>2}\n"
"{:<6}{:>5d} {:<4}{:>1}{:>3} {:>1}{:>4}{:>1} {:>8.3f}{:>8.3f}{:>8.3f}{:>6.2f}{:>6} {:<4}{:>2}{:>2}\n"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @timholy ,

Is there a reason to have more than 2 decimal places for the B-factors?

The PDB format description describe this field as:

COLUMNS      DATA TYPE        FIELD      DEFINITION
------------------------------------------------------
61 - 66      Real(6.2)        tempFactor Temperature factor.

Copy link
Contributor Author

@timholy timholy Jun 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh shoot, I don't know why I did that. But in terms of reading a file I guess it shouldn't matter much, since it's what's in the file that matters.

)

# Models are numbered sequentially beginning with 1.
Expand Down
2 changes: 1 addition & 1 deletion src/PDB/PDBResidues.jl
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ end
# (cross(points[2] - points[1], points[3] - points[1]), sum(points)./length(points))
# end

# Show PDB* objects (using Formatting)
# Show PDB* objects (using Format)
# ====================================

const _Format_ResidueID = FormatExpr("{:>15} {:>15} {:>15} {:>15} {:>15} {:>15}\n")
Expand Down
Loading