nanoporetech / flappie

Flip-flop basecaller for Oxford Nanopore reads
Other
99 stars 15 forks source link

how to deal with the signal to prepare for flowing into neural network #18

Closed huangnengCSU closed 5 years ago

huangnengCSU commented 5 years ago

hi: I am reading the codes, but I am confused how you deal with the raw signal to flow into neural network. Did you split the signals of each read by a constant windows length, and if so, did neighboring windows signal have overlap? Thank you.

tmassingham-ont commented 5 years ago

Hello. Each read is processed by the neural network independently. Firstly, the raw signal is trimmed and scaled, then this is used as input to the network. The first layer of the network is a down-sampling convolutional layer, a simple form of pooling. Currently a window of size 19 overlapping by 17 elements.

huangnengCSU commented 5 years ago

So each raw signal after down-sampling will have the same size, then it flows into convolutional layer?

tmassingham-ont commented 5 years ago

The length of the raw signal, both before and after down-sampling, is proportional to the time the read took and varies from read to read.

huangnengCSU commented 5 years ago

i am not very clear, the parameter matrices of the convolution layer and the gru layers are fixed, it means each input vectors need to be the same size. How did you achieve it?

tmassingham-ont commented 5 years ago

The convolution and recurrent neural network layers act in two dimensions, features and time. The number of features is defined by the network parameters, the size of the time dimension is defined by the input data. The input to the neural network in Flappie is the signal for each read. The only complicating factor is that the flappie_matrix objects are padded so the the number of rows is a multiple of four (column major format) the parameters of the network layers adjusted accordingly.

On 18 Dec 2018, at 03:01, huangnengCSU notifications@github.com<mailto:notifications@github.com> wrote:

i am not very clear, the parameter matrices of the convolution layer and the gru layers are fixed, it means each input vectors need to be the same size. How did you achieve it?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/nanoporetech/flappie/issues/18#issuecomment-448079493, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ASguCP3_iOpPGwAlpX_WDcTQNDExOYOKks5u6FqagaJpZM4ZVaxV.

IMPORTANT NOTICE: The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, re-transmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Although we routinely screen for viruses, addressees should check this e-mail and any attachment for viruses. We make no warranty as to absence of viruses in this e-mail or any attachments. Registered Office: Oxford Science Park, Oxford OX4 4GA; Registered No. 05386273 ; VAT No 874 642494. Think about the environment - Do you need to print this email?

huangnengCSU commented 5 years ago

oh, I got it. Thank you for your explanation.