Skip to content

Instantly share code, notes, and snippets.

View lidaof's full-sized avatar

Daofeng Li lidaof

View GitHub Profile
@lidaof
lidaof / localbam.js
Created June 10, 2019 20:14
Testing local bam
import React, { Component } from 'react';
import './App.css';
import { BamFile } from '@gmod/bam';
class App extends Component {
handleFileUpload = async (event) => {
const fileList = Array.from(event.target.files);
const baiFilehandle = fileList.filter(f => f.name.endsWith('.bai'))[0];
const bamFilehandle = fileList.filter(f => !f.name.endsWith('.bai'))[0];