keyword stringclasses 7
values | repo_name stringlengths 8 98 | file_path stringlengths 4 244 | file_extension stringclasses 29
values | file_size int64 0 84.1M | line_count int64 0 1.6M | content stringlengths 1 84.1M ⌀ | language stringclasses 14
values |
|---|---|---|---|---|---|---|---|
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/import_hhsuite.py | .py | 26,712 | 642 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module for parsing HH-suite (https://github.com/so... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/similarity_searches_protocols/hmmsearch.py | .py | 7,053 | 176 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module for performing hmmsearch (profile-vs-sequen... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/updater_protocols/__init__.py | .py | 7,840 | 184 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module for updating the BLAST ... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/updater_protocols/updater_gui.py | .py | 18,386 | 368 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import traceback
from so... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/updater_protocols/updater_internal.py | .py | 23,431 | 530 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import gzip
import shuti... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/structural_databases_protocols/__init__.py | .py | 26,630 | 558 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import gzip
import urllib.re... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/clustalo.py | .py | 6,834 | 179 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Clustal Omega.
"""
import os
fro... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/muscle.py | .py | 3,872 | 93 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
MUSCLE.
"""
import os
from Bio.Align.Application... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/clustalw.py | .py | 7,335 | 175 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
ClustalW.
"""
import os
from Bio... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/salign_seq.py | .py | 15,705 | 316 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
from Bio import SeqIO
impo... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/ce_alignment.py | .py | 9,990 | 245 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module for performing CE-alignments in PyMod.
"""
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/__init__.py | .py | 0 | 0 | null | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/_clustal_common.py | .py | 6,622 | 131 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import shutil
import re
import pymod_lib.py... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/_salign_common.py | .py | 3,017 | 71 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import shutil
import re
imp... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/salign_str.py | .py | 6,506 | 139 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
from Bio import SeqIO
from... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/_base_alignment/_base_regular_alignment.py | .py | 27,738 | 578 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Regular alignments.
"""
import os
from Bio impor... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/_base_alignment/_gui.py | .py | 12,392 | 265 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import sys
import pymod_lib.pymod_vars as p... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/_base_alignment/_base_profile_alignment.py | .py | 7,887 | 164 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Profile alignments.
"""
from pymod_lib import pym... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/alignment_protocols/_base_alignment/__init__.py | .py | 15,770 | 361 | # Copyright 2016 by Chengxin Zhang, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import shutil
from Bio impo... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/domain_analysis_protocols/split_domains.py | .py | 6,058 | 139 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Protocol to split a sequence i... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/domain_analysis_protocols/__init__.py | .py | 0 | 0 | null | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/domain_analysis_protocols/domain_analysis.py | .py | 12,699 | 276 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Protocols to search and assign... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/domain_analysis_protocols/hmmscan/_gui.py | .py | 19,582 | 439 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
GUI for performing hmmscan sea... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/domain_analysis_protocols/hmmscan/__init__.py | .py | 20,738 | 489 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Module implementing hmmscan (f... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/scr_find.py | .py | 15,878 | 343 | # Copyright 2020 by Dario Marzella, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import math
from pymod_lib import pym... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/weblogo.py | .py | 11,424 | 251 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import pymod_lib.pymod_... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/_evolutionary_analysis_base.py | .py | 607 | 15 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
from pymod_lib.pymod_protocols.base_protocols import P... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/pair_conservation.py | .py | 6,164 | 163 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Protocol to compute the conservation scores betwee... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/__init__.py | .py | 0 | 0 | null | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/entropy_scorer.py | .py | 10,119 | 237 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
"""
Protocol to compute Shannon's entropy or relative ... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/tree_building.py | .py | 6,700 | 154 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
# TODO:
# - add the possibility to save trees in the... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/campo.py | .py | 17,460 | 387 | # Copyright 2020 by Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
from Bio import SeqIO
import numpy as np
... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/espript.py | .py | 5,680 | 120 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import webbrowser
from pymod_lib.... | Python |
3D | pymodproject/pymod | pymod3/pymod_lib/pymod_protocols/evolutionary_analysis_protocols/_web_services_common.py | .py | 4,031 | 80 | # Copyright 2020 by Maria Giulia Prado, Giacomo Janson. All rights reserved.
# This code is part of the PyMod package and governed by its license. Please
# see the LICENSE file that should have been included as part of this package
# or the main __init__.py file in the pymod3 folder.
import os
import urllib.request, u... | Python |
3D | JuliaHealth/BloodFlowTrixi.jl | exemples/Model1DOrd2/exemple.jl | .jl | 1,189 | 49 | using Trixi
using BloodFlowTrixi
using OrdinaryDiffEq
eq = BloodFlowEquations1D(; h = 0.1)
eq_ord2 = BloodFlowEquations1DOrd2(eq)
mesh = TreeMesh(0.0, 40.0,
initial_refinement_level = 4,
n_cells_max = 10^4,
periodicity = false)
bc_hypo = (;
x_neg = boundary_condition_pressure_in,
x_pos = Trixi... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | exemples/Model1D/exemple.jl | .jl | 945 | 43 | using Trixi
using BloodFlowTrixi
using OrdinaryDiffEq
eq = BloodFlowEquations1D(; h = 0.1)
mesh = TreeMesh(0.0, 40.0,
initial_refinement_level = 4,
n_cells_max = 10^4,
periodicity = false)
bc = (;
x_neg = boundary_condition_pressure_in,
x_pos = Trixi.BoundaryConditionDoNothing()
)
solver = DG... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | exemples/Model2D/exemple.jl | .jl | 1,020 | 47 | using Trixi
using BloodFlowTrixi
using OrdinaryDiffEq
eq = BloodFlowEquations2D(; h = 0.1)
mesh = P4estMesh(
(1,2),
polydeg = 1,
periodicity = (true,false),
coordinates_min = (0.0,0.0),
coordinates_max = (2*pi,40.0),
initial_refinement_level = 4
)
bc = Dict(
:y_neg => boundary_condition_p... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | exemples/Model2D/diexemple.jl | .jl | 1,441 | 61 | using Trixi
using OrdinaryDiffEq
using DataInterpolations
using BloodFlowTrixi
using StaticArrays, LinearAlgebra
using QuadGK
using LinearAlgebra
eq = BloodFlowEquations2D(; h = 0.1)
xyz_data = [SA[cos(0.2*si),sin(0.2*si),si] for si in range(0,40,100)]
curve = interpolate_curve(xyz_data)
L = curve.t[end-1]
println("c... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/BloodFlowTrixi.jl | .jl | 1,243 | 23 | # should you ask why the last line of the docstring looks like that:
# it will show the package path when help on the package is invoked like help?> BloodFlowTrixi
# but will interpolate to an empty string on CI server, preventing appearing the path in the documentation built there
"""
Package BloodFlowTrixi v... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/2DModel/bc2d.jl | .jl | 3,749 | 81 | @doc raw"""
boundary_condition_outflow(u_inner, orientation_or_normal, direction, x, t, surface_flux_function, eq::BloodFlowEquations2D)
Applies an outflow boundary condition for the 2D blood flow model without reflecting any flux.
### Parameters
- `u_inner`: Inner state vector at the boundary.
- `orientation_or_... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/2DModel/2dmodel.jl | .jl | 10,029 | 265 | @doc raw"""
BloodFlowEquations2D(;h,rho=1.0,xi=0.25)
Defines the two-dimensional blood flow equations derived from the Navier-Stokes equations in curvilinear coordinates under the thin-artery assumption. This model describes the dynamics of blood flow along a compliant artery in two spatial dimensions (s, θ).
###... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/2DModel/viz.jl | .jl | 7,237 | 155 | @doc raw"""
get3DData(eq::BloodFlowEquations2D,curve::F1,er::F2,semi,sol,time_index ::Int = 1;vtk ::Bool=false,out ::T="./datas") where {T<:AbstractString,F1<:Function,F2<:Function}
Generates 3D spatial data from a 2D blood flow model for visualization.
This function extracts unique node coordinates, computes rel... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/2DModel/variables.jl | .jl | 6,345 | 250 | @doc raw"""
Trixi.varnames(::typeof(cons2cons), ::BloodFlowEquations2D)
Returns the variable names in conservative form for the 2D blood flow model.
### Parameters
- `::typeof(cons2cons)`: Type representing the conservative variables.
- `::BloodFlowEquations2D`: Instance of `BloodFlowEquations2D`.
### Returns
Tu... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/2DModel/Test_Cases/pressure_in.jl | .jl | 4,506 | 143 | @doc raw"""
initial_condition_simple(x, t, eq::BloodFlowEquations2D; R0=2.0)
Defines a simple initial condition for the 2D blood flow model.
### Parameters
- `x`: Position vector.
- `t`: Initial time.
- `eq::BloodFlowEquations2D`: Instance of `BloodFlowEquations2D`.
- `R0`: Initial radius (default is 2.0).
### R... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/2DModel/Test_Cases/convergence_test.jl | .jl | 571 | 24 |
function Trixi.initial_condition_convergence_test(x, t, eq::BloodFlowEquations2D)
T = eltype(x)
R0 = T(1.0)
A0 = T(R0^2/2)
E = T(1e7)
QRθ =
Qs = T(sinpi(x[1] * t))
return SVector(zero(T), QRθ,Qs, E, A0)
end
function Trixi.source_terms_convergence_test(u, x, t, eq::BloodFlowEquations2D)... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/1DModel/1dmodel.jl | .jl | 4,741 | 153 | @doc raw"""
BloodFlowEquations1D(;h,rho=1.0,xi=0.25,nu=0.04)
Blood Flow equations in one space dimension. This model describes the dynamics of blood flow along a compliant artery using one-dimensional equations derived from the Navier-Stokes equations. The equations account for conservation of mass and momentum, i... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/1DModel/viz.jl | .jl | 3,590 | 84 | @doc raw"""
get3DData(eq::BloodFlowEquations1D,semi,sol,time_index ::Int = 1;theta_disc ::Int = 32,vtk ::Bool=false,out ::T="./datas") where T<:AbstractString
Generates 3D spatial data from a 1D blood flow model for visualization.
This function extracts unique node coordinates, computes relevant flow parameters,
a... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/1DModel/variables.jl | .jl | 5,489 | 224 | @doc raw"""
Trixi.varnames(::typeof(cons2cons), ::BloodFlowEquations1D)
Returns the variable names corresponding to the conserved variables in the blood flow model.
### Parameters
- `::typeof(cons2cons)`: Type indicating conserved to conserved variable conversion.
- `::BloodFlowEquations1D`: Instance of `BloodFlow... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/1DModel/bc1d.jl | .jl | 3,006 | 80 | @doc raw"""
boundary_condition_outflow(u_inner, orientation_or_normal, direction, x, t, surface_flux_function, eq::BloodFlowEquations1D)
Implements the outflow boundary condition, assuming that there is no reflection at the boundary.
### Parameters
- `u_inner`: State vector inside the domain near the boundary.
- ... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/1DModel/Ord2/1dmodelord2.jl | .jl | 2,548 | 67 | struct BloodFlowEquations1DOrd2{E} <: Trixi.AbstractEquationsParabolic{1, 4, GradientVariablesConservative}
model1d ::E
end
Trixi.varnames(mapin,eq::BloodFlowTrixi.BloodFlowEquations1DOrd2) = Trixi.varnames(mapin,eq.model1d)
function Trixi.flux(u,gradients,orientation::Int,eq_parab ::BloodFlowEquations1DOrd2)
... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/1DModel/Test_Cases/pressure_in.jl | .jl | 3,618 | 106 | @doc raw"""
initial_condition_simple(x, t, eq::BloodFlowEquations1D; R0=2.0)
Generates a simple initial condition with a specified initial radius `R0`.
### Parameters
- `x`: Position vector.
- `t`: Time scalar.
- `eq::BloodFlowEquations1D`: Instance of the blood flow model.
- `R0`: Initial radius (default: `2.0`)... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | src/1DModel/Test_Cases/convergence_test.jl | .jl | 2,354 | 64 | @doc raw"""
initial_condition_convergence_test(x, t, eq::BloodFlowEquations1D)
Generates a smooth initial condition for convergence tests of the blood flow equations.
### Parameters
- `x`: Position vector.
- `t`: Time scalar.
- `eq::BloodFlowEquations1D`: Instance of the blood flow model.
### Returns
Initial con... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | ext/BloodFlowTrixiDataInterpolationsExt.jl | .jl | 1,637 | 41 | module BloodFlowTrixiDataInterpolationsExt
if isdefined(Base, :get_extension)
using BloodFlowTrixi
using DataInterpolations
else
using ..BloodFlowTrixi
using ..DataInterpolations
end
using StaticArrays, LinearAlgebra
using ForwardDiff
function BloodFlowTrixi.inte... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | test/runtests.jl | .jl | 359 | 14 | using BloodFlowTrixi
using Test
@testset "BloodFlowTrixi.jl" begin
include("./Aqua/aquatest.jl")
include("./Extensions/DataInterpolationsTest.jl")
@testset "1D Blood Flow Model" begin
include("../exemples/Model1D/exemple.jl")
end
@testset "2D Blood Flow Model" begin
include("../ex... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | test/Extensions/DataInterpolationsTest.jl | .jl | 137 | 6 | using DataInterpolations
@testset "2D Blood Flow Model with interpolation" begin
include("../../exemples/Model2D/diexemple.jl")
end | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | test/Aqua/aquatest.jl | .jl | 112 | 6 | using Aqua
@testset "Code quality (Aqua.jl)" begin
Aqua.test_all(BloodFlowTrixi; ambiguities = false,)
end
| Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | docs/make.jl | .jl | 623 | 26 | using BloodFlowTrixi
using Documenter
DocMeta.setdocmeta!(BloodFlowTrixi, :DocTestSetup, :(using BloodFlowTrixi); recursive=true)
makedocs(;
modules=[BloodFlowTrixi],
authors="yolhan83 <yolhan@laposte.net>",
sitename="BloodFlowTrixi.jl",
format=Documenter.HTML(;
canonical="https://github.com/J... | Julia |
3D | JuliaHealth/BloodFlowTrixi.jl | docs/src/index.md | .md | 4,372 | 89 | ```@meta
CurrentModule = BloodFlowTrixi
```
# BloodFlowTrixi.jl
**BloodFlowTrixi.jl** is a Julia package that implements one-dimensional (1D) and two-dimensional (2D) blood flow models for arterial circulation. These models are derived from the Navier-Stokes equations and were developed as part of my PhD research in ... | Markdown |
3D | JuliaHealth/BloodFlowTrixi.jl | docs/src/math.md | .md | 3,997 | 89 | # 1D and 2D Mathematical Models for Blood Flow
## 1D Model
The 1D model is based on a **cross-sectional integration of the Navier-Stokes equations** under the assumption of **incompressible flow** in thin arteries. This model is particularly suitable for global studies of the arterial network, where the geometry is ap... | Markdown |
3D | JuliaHealth/BloodFlowTrixi.jl | docs/src/tuto.md | .md | 22,644 | 602 | ## Tutorial for the 1D model
In this section, we describe how to use **BloodFlowTrixi.jl** with **Trixi.jl**. This tutorial will guide you through setting up and running a 1D blood flow simulation, including mesh creation, boundary conditions, numerical fluxes, and visualization of results.
### Packages
Before start... | Markdown |
3D | QIICR/Slicer-PETDICOMExtension | SUVFactorCalculatorCLI/dcmHelpersCommon.cxx | .cxx | 30,565 | 680 | #include "dcmHelpersCommon.h"
#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmdata/dctk.h"
#include "dcmtk/dcmsr/dsriodcc.h"
#include "dcmtk/dcmsr/dsrdoc.h"
#define WARN_IF_ERROR(X,M) X
// List of tags copied from David Clunie's Pixelmed toolkit
const DcmTagKey dcmHelpersCommon::patientModuleTags[] = {
DCM_P... | Unknown |
3D | QIICR/Slicer-PETDICOMExtension | SUVFactorCalculatorCLI/dcmUnitsConversionHelper.h | .h | 527 | 15 | /*----------------------------------------------------------------------
Helper functions for converting units in SUVFactorCalculator.cxx
-----------------------------------------------------------------------*/
#ifndef __dcmUnitsConversionHelper_h
#define __dcmUnitsConversionHelper_h
double ConvertTimeToSeconds(... | Unknown |
3D | QIICR/Slicer-PETDICOMExtension | SUVFactorCalculatorCLI/dcmUnitsConversionHelper.cxx | .cxx | 13,871 | 614 | #include "dcmUnitsConversionHelper.h"
#include <iostream>
#include <cstdlib>
#include <cstring>
//#include "dcmtk/config/osconfig.h"
//#include "dcmtk/dcmdata/dctk.h"
//#include "dcmtk/dcmsr/dsriodcc.h"
//#include "dcmtk/dcmsr/dsrdoc.h"
// ...
// ........................................................................... | Unknown |
3D | QIICR/Slicer-PETDICOMExtension | SUVFactorCalculatorCLI/SUVFactorCalculator.cxx | .cxx | 46,327 | 1,193 |
#include "SUVFactorCalculatorCLP.h"
// VTK includes
#include <vtkGlobFileNames.h>
#include <vtksys/Directory.hxx>
// ITK includes
#include <itkGDCMSeriesFileNames.h>
#include <itkImageSeriesReader.h>
#include <itkImageFileReader.h>
#include <itkNrrdImageIO.h>
#include <itkImageFileWriter.h>
#include <itkImageRegionC... | Unknown |
3D | QIICR/Slicer-PETDICOMExtension | SUVFactorCalculatorCLI/dcmHelpersCommon.h | .h | 2,845 | 65 | #ifndef __dcmHelpersCommon_h
#define __dcmHelpersCommon_h
#include <vector>
class DcmItem;
class DcmTagKey;
class DcmDataset;
class DSRDocument;
class DSRCodedEntryValue;
class dcmHelpersCommon {
protected:
static const DcmTagKey patientModuleTags[];
static const DcmTagKey clinicalTrialSubjectModuleTags[];... | Unknown |
3D | QIICR/Slicer-PETDICOMExtension | SUVFactorCalculatorCLI/itkDCMTKFileReader.h | .h | 12,563 | 372 | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... | Unknown |
3D | QIICR/Slicer-PETDICOMExtension | SUVFactorCalculatorCLI/itkDCMTKFileReader.cxx | .cxx | 34,168 | 1,206 | /*=========================================================================
*
* Copyright Insight Software Consortium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* h... | Unknown |
3D | QIICR/Slicer-PETDICOMExtension | SUVFactorCalculatorCLI/Testing/Cxx/SUVFactorCalculatorTest.cxx | .cxx | 431 | 26 | #if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
#ifdef __BORLANDC__
#define ITK_LEAN_AND_MEAN
#endif
#include "itkTestMain.h"
// STD includes
#include <iostream>
#ifdef WIN32
# define MODULE_IMPORT __declspec(dllimport)
#else
# define MODULE_IMPORT
#endif
extern "C" MODULE_IMPORT int ModuleEntryPoi... | Unknown |
3D | QIICR/Slicer-PETDICOMExtension | Testing/PETDicomExtensionSelfTest.py | .py | 12,910 | 287 | import os
import unittest
import vtk, qt, ctk, slicer, logging
from DICOMLib import DICOMUtils
from slicer.ScriptedLoadableModule import *
if slicer.app.majorVersion >= 5 or (slicer.app.majorVersion == 4 and slicer.app.minorVersion >= 11):
import pydicom
else:
import dicom
#
# PETDicomExtensionSelfTest
#
class P... | Python |
3D | QIICR/Slicer-PETDICOMExtension | DICOMPETSUVPlugin/DICOMPETSUVPlugin.py | .py | 9,543 | 264 | import os
import sys as SYS
from __main__ import vtk, qt, ctk, slicer
from DICOMLib import DICOMPlugin
from DICOMLib import DICOMLoadable
if slicer.app.majorVersion >= 5 or (slicer.app.majorVersion == 4 and slicer.app.minorVersion >= 11):
import pydicom
else:
import dicom
import DICOMLib
import math as math
#
#... | Python |
3D | QIICR/Slicer-PETDICOMExtension | DICOMRWVMPlugin/DICOMRWVMPlugin.py | .py | 15,669 | 396 | import os
import sys as SYS
from __main__ import vtk, qt, ctk, slicer
from DICOMLib import DICOMPlugin
from DICOMLib import DICOMLoadable
if slicer.app.majorVersion >= 5 or (slicer.app.majorVersion == 4 and slicer.app.minorVersion >= 11):
import pydicom
else:
import dicom
import DICOMLib
import math as math
cla... | Python |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | sphere_image_creation_task_2.m | .m | 3,314 | 105 | close all;
clear all;
clc;
%%%this code block is used to create the images %%%%%
%%%later part of this code block is used to save images %%%%%%%
%%theta=(2*pi)/180; %in radian
%%r=2;
%%Xus=10;
angle=-(pi/10):theta:(pi/10); %%outf this angle no images are taken
[alpha,beta]=size(angle);
%num_pixel=Xus/0.1;
im=zero... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | test_6_voxel_visualization.m | .m | 703 | 26 | % This scrypt illustrates the use of VoxelPlotter function to visualize
% voxel data stored in a 3d matrix
clear all
close all
clc
%Generating sinthetic input
gridesize=16;
R=8;
VoxelMat=zeros(gridesize,gridesize,gridesize);
for i=1:gridesize
for j=1:gridesize
for k=1:gridesize
if (i-gridesize/... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | test_1.m | .m | 1,769 | 78 | %test - dicom image process =
close all;
clear all ;
clc ;
m=dicominfo('bmode.dcm');
X=dicomread(im);
a_1=rgb2gray(X(29:568,235:790,:,1)); %extraction of first image // the range to extract jst the image
a_2=rgb2gray(X(29:568,235:790,:,2)); %extraction of the second image
figure,
subplot(1,2,1);imshow(X(:,:,:,1)... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | createmainimage.m | .m | 3,485 | 108 | function [ im_main ] = createmainimage(Xus,r,theta,num_pixel)
%%%this code block is used to create the images %%%%%
%%%later part of this code block is used to save images %%%%%%%
%%theta=(2*pi)/180; %in radian
%%r=2;
%%Xus=10;
angle=-(pi/10):theta:(pi/10); %%outf this angle no images are taken
[alpha,beta]=size(an... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | test_3_creating_a_bmode_image.m | .m | 4,975 | 125 | function [imageOut, rfEnvelope] = fcnPseudoBmodeUltrasoundSimulator(echoModel,f0,c,sigma_x,sigma_y,speckleVariance)
% fcnPseudoBmodeUltrasoundSimulator generates a simulated Pseudo B-Mode
% Ultrasound image given the echogenicity model for the structure to be
% imaged.
%
% OUTPUTIMAGE = fcnPseudoBmodeUltrasoundS... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | fcnPseudoBmodeUltrasoundSimulator.m | .m | 4,999 | 128 | function [imageOut, rfEnvelope] = fcnPseudoBmodeUltrasoundSimulator(echoModel,f0,c,sigma_x,sigma_y,speckleVariance)
% fcnPseudoBmodeUltrasoundSimulator generates a simulated Pseudo B-Mode
% Ultrasound image given the echogenicity model for the structure to be
% imaged.
%
% OUTPUTIMAGE = fcnPseudoBmodeUltrasoundS... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | theonewith_voxels.m | .m | 940 | 45 | clear all; close all; clc;
gridesize=11;
% numbers are arbitrary
cube=zeros(11,11,11);
cube(3:9,3:9,3:9)=5; % Create a cube inside the region
% Boring: faces of the cube are a different color.
cube(3:9,3:9,3)=1;
cube(3:9,3:9,9)=1;
cube(3:9,3,3:9)=1;
cube(3:9,9,3:9)=1;
cube(3,3:9,3:9)=2;
cube(9,3:9,3:9)=1;
H=vol3d('C... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | test_5.m | .m | 165 | 7 | load example_us_bmode_scan_lines.mat
echoModel= scan_lines;
[imageOut, rfEnvelope] = fcnPseudoBmodeUltrasoundSimulator(echoModel);
figure,
imshow(imageOut);
| MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | FindExternalVoxels.m | .m | 5,098 | 125 | function [FV]=FindExternalVoxels(VoxelMat,Vox_Size)
% FindExternalVoxels scans VoxeLMat (a 3D matrix) and finds which voxels
% are external by checking if they have nieghbors from all 6 sides
% (TOP,BOTTOM,FRONT,BACK,LEFT,RIGHT). After finding if the voxel is
% external it finds which faces are external by calling Find... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | bilinear.m | .m | 1,069 | 47 | function [im_zoom] = bilinear( array_recon )
%bilinear interpolation of an image is done here
a=array_recon;
factor=1; %zooming factor
[m n d] = size(a); %2 dimentional array values
rows=factor*m;
columns=factor*n;
for i=1:rows
x=i/factor;
x1=floor(x); %bilinear in X direction
x2=ce... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | test_2.m | .m | 430 | 22 | %test - dicom image process =
close all;
clear all ;
clc ;
im=dicominfo('US-MONO2-8-8x-execho.dcm');
X=dicomread(im);
a=zeros(120,128,8);
for i=[1:8]
a(:,:,i)=X(:,:,:,i);
figure,
imshow(uint8(a(:,:,1)));
end
%a_1=X(:,:,:,1); %extraction of first image // the range to extract jst the image
%a_2=X(:,:,:,2)... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | VoxelPlotter.m | .m | 348 | 16 | function [vol_handle,FV]=VoxelPlotter(VoxelMat,Vox_Size)
%detect the external voxels and faces
vol_handle=0;
if nargin==1
Vox_Size=1;
end
FV=FindExternalVoxels(VoxelMat,Vox_Size);
%plot only external faces of external voxels
cla;
if size(FV.vertices,1)==0
cla;
else
%patch voxel
vol_handle=patch(FV,'FaceColor',... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | vol3d.m | .m | 7,611 | 256 | function [model] = vol3d(varargin)
%H = VOL3D Volume render 3-D data.
% VOL3D uses the orthogonal plane 2-D texture mapping technique for
% volume rending 3-D data in OpenGL. Use the 'texture' option to fine
% tune the texture mapping technique. This function is best used with
% fast OpenGL hardware.
%
% vol3d ... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | SurfaceIntersection.m | .m | 35,459 | 942 | function [intMatrix, intSurface] = SurfaceIntersection(surface1, surface2, varargin)
%SURFACEINTERSECTION intersection of 2 surfaces
% [intMatrix, intSurface] = SurfaceIntersection(surface1, surface2)
% calculates the intersection of surfaces 1 and 2. Code can either return
% just the matrix indicating which face of su... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | task_final_praga.m | .m | 3,669 | 128 | close all ;
clear all ;
clc;
%%author - Praga
%%process time - 13 sec (without thresholding)
%% - 1 minute (with thresolding)
%%%%%%%% Task 1 %%%%%%%%%%%%%%%%%%%%%%%
%%the conditions for R %%%%%%%%%%%%%%%%%%
%% 1) tan(theta/2) > R/Yp
%% 2) Yus*cos(theta/2) > 2R
%% 3) Xus*cos(theta/2) > 2R
%% 4) Yus -... | MATLAB |
3D | pragasv/Modeling-a-3D-ultrasound-scan-and-reconstruction | Update_frontend/task_upgrade.m | .m | 2,884 | 105 | %task 2 ___ Update 1.0
%%%a front end script %%%%%%%%%%%%%%%%%%
%% the contour can be visualized in this script in a more mathematically efficient manner
%% the images will be saved in a directory after plot
%% this can be loaded for the next step processing
%% this script is designed for all knds of scenario which m... | MATLAB |
3D | simonhmartin/dfs | sim_SFS_moments.py | .py | 8,851 | 198 | #!/usr/bin/env python
# Simon H. Martin 2020
# simon.martin@ed.ac.uk
# This script accompanies the paper:
# "Signatures of introgression across the allelel frequency spectrum"
# by Simon H. Martin and William Amos
# It is a wrapper for the moments package (Jouganous et al. 2017, https://doi.org/10.1534/genetics.117.... | Python |
3D | simonhmartin/dfs | DFS.R | .R | 13,879 | 308 |
# Simon H. Martin 2020
# simon.martin@ed.ac.uk
# This script accompanies the paper:
# "Signatures of introgression across the allelel frequency spectrum"
# by Simon H. Martin and William Amos
# It contains functions for computing and plotting the D frequency spectrum
# and related statistics from an input site frequ... | R |
3D | simonhmartin/dfs | sim_DFS_moments.R | .R | 28,743 | 580 |
# Simon H. Martin 2020
# simon.martin@ed.ac.uk
################################ Start Here ####################################
# This script accompanies the paper:
# "Signatures of introgression across the allelel frequency spectrum"
# by Simon H. Martin and William Amos
# It provides code for setting up and simul... | R |
3D | simonhmartin/dfs | plot_DFS_from_SFS.R | .R | 8,640 | 194 |
# Simon H. Martin 2020
# simon.martin@ed.ac.uk
################################ Start Here ####################################
# This script accompanies the paper:
# "Signatures of introgression across the allelel frequency spectrum"
# by Simon H. Martin and William Amos
# Each section below computes and plots the... | R |
3D | simonhmartin/dfs | SHINY_sim_DFS_moments/sim_SFS_moments.py | .py | 8,851 | 198 | #!/usr/bin/env python
# Simon H. Martin 2020
# simon.martin@ed.ac.uk
# This script accompanies the paper:
# "Signatures of introgression across the allelel frequency spectrum"
# by Simon H. Martin and William Amos
# It is a wrapper for the moments package (Jouganous et al. 2017, https://doi.org/10.1534/genetics.117.... | Python |
3D | simonhmartin/dfs | SHINY_sim_DFS_moments/server.R | .R | 13,039 | 274 | source("DFS.R")
if.null <- function(x,y){
if (is.null(x)==TRUE) return(y)
return(x)
}
make_3pop_sim_command <- function(params){
paste("python3", "sim_SFS_moments.py",
"--Nsam", paste(params$n1,params$n2,params$n3),
"--twoPopPeriod", paste0("T=",params$p2_T, #input is in units... | R |
3D | simonhmartin/dfs | SHINY_sim_DFS_moments/DFS.R | .R | 13,879 | 308 |
# Simon H. Martin 2020
# simon.martin@ed.ac.uk
# This script accompanies the paper:
# "Signatures of introgression across the allelel frequency spectrum"
# by Simon H. Martin and William Amos
# It contains functions for computing and plotting the D frequency spectrum
# and related statistics from an input site frequ... | R |
3D | simonhmartin/dfs | SHINY_sim_DFS_moments/ui.R | .R | 6,117 | 101 | library(shiny)
library(shinyWidgets)
fluidPage(
titlePanel("Simulated DFS"),
fluidRow(
column(2,
wellPanel(
h2("Add Migration"),
h3("Period 2"),
checkboxInput("mig_p2", NULL),
conditionalPanel(condition = "input... | R |
3D | ding-lab/mushroom | setup.py | .py | 1,796 | 65 | from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, 'README.md')) as f:
long_description = f.read()
setup(
# $ pip install mushroom
name='mushroom',
version='0.0.4',
d... | Python |
3D | ding-lab/mushroom | mushroom/__init__.py | .py | 0 | 0 | null | Python |
3D | ding-lab/mushroom | mushroom/utils.py | .py | 8,435 | 254 | import collections.abc
import os
import re
import numpy as np
import matplotlib.pyplot as plt
import tifffile
import torch
import torch.nn.functional as F
import torchvision.transforms.functional as TF
from torchio.transforms import Resize
from einops import rearrange
from sklearn.cluster import AgglomerativeClusterin... | Python |
3D | ding-lab/mushroom | mushroom/mushroom.py | .py | 38,941 | 868 | import logging
import pickle
import os
import re
from copy import deepcopy
from pathlib import Path
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import torch
import torch.nn.functional as F
import torchvision.transforms.functional as TF
import yaml
from einops import rearrange, repeat
from t... | Python |
3D | ding-lab/mushroom | mushroom/model/model.py | .py | 9,921 | 239 | import logging
import os
from typing import Any, Optional
import warnings
from pytorch_lightning.utilities.types import STEP_OUTPUT
import numpy as np
import torch
from einops import rearrange, repeat
from torch.utils.data import DataLoader
from vit_pytorch import ViT
from lightning.pytorch import LightningModule
from... | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.