Skip to content

Commit

Permalink
Merge pull request #14 from cschin/main
Browse files Browse the repository at this point in the history
bump version to v0.4.1
  • Loading branch information
cschin authored Apr 11, 2023
2 parents 601ee35 + 07eb574 commit 620db0c
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion pgr-bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pgr-bin"
version = "0.4.0"
version = "0.4.1"
edition = "2021"
authors = ["Jason Chin <[email protected]>"]

Expand Down
9 changes: 6 additions & 3 deletions pgr-bin/src/bin/pgr-pbundle-bed2svg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ struct CmdOptions {
/// the track panel size in pixel
#[clap(long, default_value_t = 1600)]
track_panel_width: usize,
/// the factor to increase height of each track
#[clap(long, default_value_t = 1.0)]
track_scaling: f32,
/// the left padding in pixel
#[clap(long)]
left_padding: Option<usize>,
Expand Down Expand Up @@ -310,9 +313,9 @@ fn main() -> Result<(), std::io::Error> {

let mut y_offset = 0.0_f32;
let delta_y = if !annotation_region_record.is_empty() {
22.0_f32 + args.annotation_region_stroke_width * 0.5
22.0_f32 * args.track_scaling + args.annotation_region_stroke_width * 0.5
} else {
16.0_f32
16.0_f32 * args.track_scaling
};

// generate the bundle path elements
Expand All @@ -338,7 +341,7 @@ fn main() -> Result<(), std::io::Error> {
}

let arror_end = end as f32;
let halfwidth = 5.0;
let halfwidth = 5.0 * args.track_scaling;
let end =
if direction == 0 {
if end as f32 - halfwidth < bgn {
Expand Down
2 changes: 1 addition & 1 deletion pgr-db/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pgr-db"
version = "0.4.0"
version = "0.4.1"
edition = "2021"
authors = ["Jason Chin <[email protected]>"]
build = "build.rs"
Expand Down
14 changes: 7 additions & 7 deletions pgr-db/src/seq_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,9 +808,9 @@ impl CompactSeqDB {
impl CompactSeqDB {
pub fn write_to_frag_files(&self, file_prefix: String) {
let mut sdx_file =
BufWriter::new(File::create(file_prefix.clone() + ".sdx").expect("csq file open fail"));
BufWriter::new(File::create(file_prefix.clone() + ".sdx").expect("sdx file creating fail\n"));
let mut frg_file =
BufWriter::new(File::create(file_prefix + ".frg").expect("frg file open fail"));
BufWriter::new(File::create(file_prefix + ".frg").expect("frg file creating fail\n"));

let config = config::standard();

Expand Down Expand Up @@ -844,11 +844,11 @@ impl CompactSeqDB {
let l = v.len();
frag_addr_offeset.push((offset, v.len(), *frag_len));
offset += l;
frg_file.write_all(v).expect("frag file writing error");
frg_file.write_all(v).expect("frag file writing error\n");
});

bincode::encode_into_std_write((frag_addr_offeset, &self.seqs), &mut sdx_file, config)
.expect("csq file writing error");
.expect("sdx file writing error\n");
//bincode::encode_into_std_write(compressed_frags, &mut frg_file, config)
// .expect(" frag file writing error");
}
Expand Down Expand Up @@ -1233,7 +1233,7 @@ pub fn write_shmr_map_file(
shmmr_map: &ShmmrToFrags,
filepath: String,
) -> Result<(), std::io::Error> {
let mut out_file = File::create(filepath).expect("open fail");
let mut out_file = File::create(filepath).expect("open fail while writing the SHIMMER map (.mdb) file\n");
let mut buf = Vec::<u8>::new();

buf.extend("mdb".to_string().into_bytes());
Expand Down Expand Up @@ -1265,7 +1265,7 @@ pub fn write_shmr_map_file(
}

pub fn read_mdb_file(filepath: String) -> Result<(ShmmrSpec, ShmmrToFrags), io::Error> {
let mut in_file = File::open(filepath).expect("open fail");
let mut in_file = File::open(filepath).expect("Error while opening the SHIMMER map file (.mdb) file");
let mut buf = Vec::<u8>::new();

let mut u64bytes = [0_u8; 8];
Expand Down Expand Up @@ -1346,7 +1346,7 @@ pub fn read_mdb_file(filepath: String) -> Result<(ShmmrSpec, ShmmrToFrags), io::
}

pub fn read_mdb_file_parallel(filepath: String) -> Result<(ShmmrSpec, ShmmrToFrags), io::Error> {
let mut in_file = File::open(filepath).expect("open fail");
let mut in_file = File::open(filepath).expect("open fail while reading the SHIMMER map (.mdb) file");
let mut buf = Vec::<u8>::new();

let mut u64bytes = [0_u8; 8];
Expand Down
15 changes: 10 additions & 5 deletions pgr-tk-workstation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ RUN apt-get update \


RUN . /opt/conda/bin/activate && \
conda install -y python=3.8.10 jupyterlab numpy networkx==2.4 matplotlib bokeh && conda clean -ya
conda install -y python=3.10 jupyterlab numpy networkx==2.4 matplotlib bokeh && conda clean -ya

#RUN conda install -y --channel=conda-forge \
# matplotlib \
Expand All @@ -35,11 +35,16 @@ RUN pip3 install -U --no-cache-dir \
networkx==2.8.2 \
papermill==2.3.4 \
pydot==1.4.2 \
sklearn
scikit-learn

COPY pgrtk-0.4.0_dev-cp38-cp38-linux_x86_64.whl /tmp
RUN pip install /tmp/pgrtk-0.4.0_dev-cp38-cp38-linux_x86_64.whl
RUN rm /tmp/pgrtk-0.4.0_dev-cp38-cp38-linux_x86_64.whl
RUN echo deb http://http.us.debian.org/debian/ testing non-free contrib main > /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y libc6 libstdc++6
RUN ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/conda/bin/../lib/libstdc++.so.6

COPY pgrtk-0.4.0-cp310-cp310-linux_x86_64.whl /tmp
RUN pip install /tmp/pgrtk-0.4.0-cp310-cp310-linux_x86_64.whl
RUN rm /tmp/pgrtk-0.4.0-cp310-cp310-linux_x86_64.whl
RUN mkdir -p /opt/bin/ /wd/
COPY jupyterlab.sh /opt/bin/
CMD /bin/bash /opt/bin/jupyterlab.sh
4 changes: 2 additions & 2 deletions pgr-tk-workstation/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cp ../target/wheels/pgrtk-0.4.0_dev-cp38-cp38-linux_x86_64.whl .
docker build -t cschin/pgr-tk-ws:v0.4.0_dev .
cp ../target/wheels/pgrtk-0.4.0-cp310-cp310-linux_x86_64.whl .
docker build -t cschin/pgr-tk-ws:v0.4.0 .
2 changes: 1 addition & 1 deletion pgr-tk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pgrtk"
version = "0.4.0"
version = "0.4.1"
authors = ["Jason Chin <[email protected]>"]
edition = "2018"

Expand Down

0 comments on commit 620db0c

Please sign in to comment.