Skip to content

Commit

Permalink
Merge pull request #63 from loosolab/cluster
Browse files Browse the repository at this point in the history
Cluster
  • Loading branch information
HendrikSchultheis authored Jan 12, 2019
2 parents c398ce3 + 5acffac commit 499206d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/2.1_clustering/cdhit_wrapper.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ cdhitest <- function(input, identity = 0.8, coverage = 8, output = "cluster.bed"
data.table::fwrite(x = cluster_table, file = summary, append = TRUE, sep = "\t", col.names = TRUE)
}


# cast start and end column to integer64 to prevent scientific notation e.g. 1e+10
# start and end are assumed to be at position 2 and 3
result[, c(2, 3) := lapply(.SD, bit64::as.integer64), .SDcols = c(2, 3)]

data.table::fwrite(x = result, file = output, sep = "\t", col.names = keep_col_names)
}

Expand Down
4 changes: 4 additions & 0 deletions bin/2.1_clustering/reduce_sequence.R
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ reduce_sequence <- function(input, kmer = 10, motif = 10, output = "reduced.bed"
names(merged) <- col_names
}

# cast start and end column to integer64 to prevent scientific notation e.g. 1e+10
# start and end are assumed to be at position 2 and 3
merged[, c(2, 3) := lapply(.SD, bit64::as.integer64), .SDcols = c(2, 3)]

data.table::fwrite(merged, file = output, sep = "\t", col.names = keep_col_names)
}

Expand Down
1 change: 1 addition & 0 deletions masterenv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ dependencies:
- matplotlib
- seaborn
- crossmap
- r-bit64

0 comments on commit 499206d

Please sign in to comment.