Skip to content

Instantly share code, notes, and snippets.

@nimezhu
Created September 21, 2017 15:48
Show Gist options
  • Save nimezhu/0426190b6ca7229667d12db204397ea2 to your computer and use it in GitHub Desktop.
Save nimezhu/0426190b6ca7229667d12db204397ea2 to your computer and use it in GitHub Desktop.
// +build ignore
/*
* Minio Go Library for Amazon S3 Compatible Cloud Storage (C) 2015, 2016 Minio, Inc.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package main
import (
"fmt"
"log"
"github.com/minio/minio-go"
"github.com/nimezhu/indexed"
"github.com/nimezhu/stream/hic"
)
func main() {
// Note: YOUR-ACCESSKEYID, YOUR-SECRETACCESSKEY and my-bucketname are
// dummy values, please replace them with original values.
// Requests are always secure (HTTPS) by default. Set secure=false to enable insecure (HTTP) access.
// This boolean value is the last argument for New().
// New returns an Amazon S3 compatible client object. API compatibility (v2 or v4) is automatically
// determined based on the Endpoint value.
c, err := minio.New("127.0.0.1:9000", "JKXF1ETC5YBGT55MJBA7", "+nAXFwappdt+KNE5//1QrAKiGzTU7NxH3bpTo9VC", false)
if err != nil {
log.Fatalln(err)
}
bw, err := c.GetObject("hic", "K562_combined.hic")
if err != nil {
log.Fatalln(err)
}
fmt.Println(indexed.MagicReadSeeker(bw))
vhic, err := hic.DataReader(bw)
// s3Client.TraceOn(os.Stderr)
fmt.Println(vhic.Entrys())
// Create a done channel to control 'ListenBucketNotification' go routine.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment