Upgrade to Pro — share decks privately, control downloads, hide ads and more …

大量塩基配列登録申請システムができるまで

Keita Urashima
October 21, 2022
2.2k

 大量塩基配列登録申請システムができるまで

Keita Urashima

October 21, 2022
Tweet

Transcript

  1. େྔԘج഑ྻొ࿥ਃ੥γεςϜ͕
    Ͱ͖Δ·Ͱ
    ,FJUB6SBTIJNB !VSTN

    0DU ,BJHJPO3BJMT

    View full-size slide

  2. w ࠃཱҨ఻ֶݚڀॴੜ໋৘ใɾ%%#+ηϯλʔ͕
    w Ԙج഑ྻʢੜ෺ͷҨ఻৘ใʣΛσʔλϕʔεԽͯ͠ެ։͢ΔͨΊʹ
    w όΠΦݚڀऀ͔ΒԘج഑ྻͷొ࿥ਃ੥Λड͚෇͚Δࡍʹ࢖ΘΕΔγε
    ςϜ
    w (PPHMFϑΥʔϜʹϑΝΠϧΞοϓϩʔυػೳ͕෇͍ͨΑ͏ͳΠϝʔδ
    w ͨͩ͠ѻ͏ϑΝΠϧ͕େ͖͍
    ຊ೔ͷ͓୊େྔԘج഑ྻొ࿥ਃ੥γεςϜ

    View full-size slide

  3. ݱঢ়ͱΰʔϧ
    Ԙج഑ྻͷొ࿥ਃ੥Λड͚෇͚Δͱ͖ɺݱঢ়Ͱ͸
    w (PPHMFϑΥʔϜͰҰใΛೖΕͯ΋Β͏
    w ϝʔϧͰ΍ΓऔΓΛͯ͠ඞཁͳ৘ใΛώΞϦϯά͢Δ
    w TDQͰϑΝΠϧΛసૹͯ͠΋Β͏
    ͷΑ͏ͳखॱͰߦΘΕ͍ͯͯɺͱͯ΋खֻ͕͔ؒΔͷͰվળ͍ͨ͠

    View full-size slide

  4. μΠϨΫτΞοϓϩʔυ "DUJWF4UPSBHF

    w ϒϥ΢β͔Β௚઀ετϨʔδαʔϏεʹϑΝΠϧΛΞοϓϩʔυͤ͞Δ
    w ΞϓϦέʔγϣϯʹ͸࣮ϑΝΠϧͷ୅ΘΓʹϑΝΠϧΛࣝผ͢ΔΩʔ͕౉ͬͯ
    ͘Δ
    w ඞཁͰ͋Ε͹͜ͷΩʔΛ࢖ͬͯݩͷϑΝΠϧΛऔಘͰ͖Δ
    w ΞοϓϩʔυͷϋϯυϦϯάΛετϨʔδαʔϏεʹؙ౤͛Ͱ͖Δ

    View full-size slide

  5. Ξοϓϩʔυ͚ͩͰ͸ͳ͔ͬͨ
    w Ξοϓϩʔυ͞ΕͨϑΝΠϧͷத਎ΛಡΈग़ͯ͠ϑΥʔϜͷ߲໨ΛҰ෦ࣗಈͰ
    ຒΊ͍ͨ
    w ϑΝΠϧ͕େ͖͍ͱۃΊͯ೉͍͠

    View full-size slide

  6. 4USFBNT"1*
    w ϒϥ΢β্ͰσʔλΛࡉ੾ΕʹಡΈॻ͖͢ΔΠϯλʔϑΣʔεΛఏڙ͢Δ
    w ର৅͸ϑΝΠϧ΍ωοτϫʔΫϦΫΤετϨεϙϯεͳͲ
    w ϝϞϦരൃͷ৺഑ͳ͘େ͖ͳσʔλΛѻ͑Δ
    const res = await fetch('https://example.com');


    res.body // これが ReadableStream

    View full-size slide




  7. <br/><br/><br/>document.querySelector('input')<br/><br/><br/>.addEventListener('change', async (e) => {<br/><br/><br/>const file = e.target.files[0];<br/><br/><br/>const reader = file.stream().getReader();<br/><br/><br/>for (;;) {<br/><br/><br/>const {done, value} = await reader.read();<br/><br/><br/><br/><br/>if (done) { break; }<br/><br/><br/>console.log(value);<br/><br/><br/>}<br/><br/><br/>});<br/><br/><br/>

    View full-size slide

  8. >NIES3753_TRINITY_DN0_c0_g1_i1_len285


    CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCTCTTCATCAAACTCCTGCGCTGCCACT
    GCAGCCAAACACACAGCTGACACAGCACCAAAATAACCCCACGCCCTGCAGCTACAG
    //


    >NIES3753_TRINITY_DN1_c3_g1_i1_len267


    CCTCAACGGGAGCAGCTGATCAAACTACAGAACTCCACACGCCCCATGGCACCACTT
    GTGACGGGACGGGCCTGGAGGTGGATTCATATCAGCCCCACCACTCCAAGCATGCTG
    //


    >NIES3753_TRINITY_DN1_c4_g1_i1_len257


    GTCCATACTGGTCCTAGCAGGTCCCAGAATCTACCTCTTGCTTGCACCATATGCACT
    TTCTGCATGCCTGGCCACAGTCTGGCTTGAGCCATTGGATGTGCCAGTTAACAGTAT
    //


    >NIES3753_TRINITY_DN1_c2_g1_i1_len229


    CCCCCCCCCCCCCCCCCCCTCTCCTGCTGCATCTGTGGGGACATGCCCATCTGAGAG
    GCAGCCCAGCACTCATTGCAGATCGCAAGACCACTCGCCTCAACTCCCTTCACCCCA
    //

    View full-size slide

  9. const LF = '\n'.codePointAt(0);


    const CR = '\r'.codePointAt(0);


    const GT = '>'.codePointAt(0);


    async function parse(file) {


    const reader = file.stream().getReader();


    let done, value;


    let entriesCount = 0;


    let isBOL = true;


    while (({done, value} = await reader.read()), !done) {


    for (const byte of value) {


    if (isBOL && byte === GT) {


    entriesCount++;


    isBOL = false;


    } else {


    isBOL = byte === LF || byte === CR;


    }


    }


    }


    return {entriesCount};


    }

    View full-size slide

  10. ύʔεதʹϒϥ΢β͕ݻ·Δ໰୊
    w େ͖ͳϑΝΠϧΛύʔε͢Δͱλϒͷඳը͕ࢭ·ͬͯૢ࡞ʹ΋൓Ԡ͠ͳ͍ঢ়ଶ
    ʹͳͬͯ͠·͏
    w ύʔε͕ऴΘΔͱݩʹ໭Δ
    w +BWB4DSJQU͸γϯάϧεϨουͳͷͰ$16཯଎ͳίʔυ͸ଞͷ͢΂ͯΛࢭΊ
    ͯ͠·͏Մೳੑ͕͋Δ
    w Ұൠతʹ͸TFU5JNFPVUͳͲͰଞͷॲཧׂ͕ΓࠐΉ༨஍Λ࡞ͬͯରԠ͢Δ

    View full-size slide

  11. 8FC8PSLFST
    w ϝΠϯεϨουͱ׬શʹಠཱͨ͠ผεϨουͰॲཧΛ࣮ߦ͢Δ࢓૊Έ
    w ϫʔΧ͸ϝΠϯεϨουͷඳը΍ૢ࡞Λ๦͛ͳ͍
    w ϫʔΧ͸ฒྻʹಈ࡞͢ΔͨΊϚϧνίΞΛ׆༻Ͱ͖Δ

    View full-size slide

  12. const worker = new Worker('./worker.js');


    worker.addEventListener('message', e => {


    console.log(e.data);


    });


    worker.postMessage('hello, world');
    addEventListener('message', e => {


    postMessage(e.data.toUpperCase());


    });
    NBJOKT
    XPSLFSKT




    View full-size slide

  13. addEventListener('message', async ({data: {file}}) => {


    try {


    const payload = await parse(file);


    postMessage([null, payload]);


    } catch (err) {


    postMessage([err, null]);


    }


    });


    async function parse(file) {


    const reader = file.stream().getReader();


    // ...


    return {entriesCount};


    }

    View full-size slide

  14. ϋογϡ஋ͷܭࢉ͕஗͍໰୊
    w "DUJWF4UPSBHF͸μΠϨΫτΞοϓϩʔυͷͱ͖ϑΝΠϧͱҰॹʹϋογϡ
    ஋ΛૹΔ
    w େ͖ͳϑΝΠϧͩͱϋογϡ஋ͷܭࢉʹֻ͕͔࣌ؒΔ
    w "DUJWF4UPSBHF͸TQBSLNEͱ͍͏ϥΠϒϥϦΛ࢖ͬͯϋογϡ஋ΛٻΊ
    ͍ͯΔ
    w TQBSLNE͸ಉछͷϥΠϒϥϦͷதͰ͸τοϓϨϕϧʹ଎͍

    View full-size slide

  15. 8FC"TTFNCMZ
    w ओʹϒϥ΢βͰ࣮ߦ͢ΔͨΊͷԾ૝తͳػցޠ
    w +BWB4DSJQUͰ͸౸ୡͰ͖ͳ͍ωΠςΟϒίʔυʹ͍ۙੑೳ͕ಘΒΕΔ
    w 8FC"TTFNCMZʹΑΔϋογϡؔ਺ͷ࣮૷IBTIXBTN
    w TQBSLNEͱൺֱͯ͠ഒҎ্ͷ଎౓վળ

    View full-size slide

  16. github.com/ddbj/submission-mss

    View full-size slide