Skip to content

Commit

Permalink
[allhic] Use logging in partition
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Jan 3, 2018
1 parent f8bba7e commit 982f002
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
13 changes: 13 additions & 0 deletions allhic/clm.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,16 @@ func (r *CLMFile) ParseClm() {
// fmt.Println(contact.a, contact.b, contact.nlinks, strandedness)
}
}

// tigToIdx maps tigs to indices in the current active tigs
func (r *CLMFile) tigToIdx() map[string]int {
m := make(map[string]int)

return m
}

// M yields a contact frequency matrix, where each cell contains how many
// links between i-th and j-th contig
func (r *CLMFile) M() {

}
6 changes: 3 additions & 3 deletions allhic/partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ type Partitioner struct {
}

// CountLinks provides the method to count the links
func (p Partitioner) CountLinks() {
fmt.Println("In CountLinks()")
fh, err := os.Open(p.Bamfile)
func (r Partitioner) CountLinks() {
fh, err := os.Open(r.Bamfile)
log.Noticef("Parse bamfile `%s`", r.Bamfile)
if err != nil {
panic(err)
}
Expand Down
3 changes: 0 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package main

import (
"fmt"

"./allhic"

"github.com/docopt/docopt-go"
Expand All @@ -27,7 +25,6 @@ Options:

if arguments["partition"].(bool) {
p := allhic.Partitioner{"tests/prunning.sub.bam"}
fmt.Println(p.Bamfile)
p.CountLinks()
} else if arguments["optimize"].(bool) {
p := allhic.Optimizer{"tests/test.clm"}
Expand Down

0 comments on commit 982f002

Please sign in to comment.