GithubHelp home page GithubHelp logo

deepram's People

Contributors

amenitrabelsi avatar medchaabane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

deepram's Issues

IndexError: string index out of range error for sequences

Hi
I am running the deepRAM as follows
python deepRAM.py --train_data CLIP_train.gz --test_data CLIP_test.gz --data_type RNA --train True --evaluate_performance True --model_path DeepBind.pkl --out_file prediction.txt --Embedding False --Conv True --RNN False --conv_layers 1

and my training and testing files are :
Clip_test.gz
Clip_train.gz

I get the following error when I run it:
python deepRAM.py --train_data Clip_train.gz --test_data Clip_test.gz --data_type RNA --train True --evaluate_performance True --model_path DeepBind.pkl --out_file prediction.txt --Embedding False --Conv True --RNN False --conv_layers 2
cuda:0
False
Load Data
Traceback (most recent call last):
File "deepRAM.py", line 982, in
main()
File "deepRAM.py", line 980, in main
run_deepRAM(args)
File "deepRAM.py", line 896, in run_deepRAM
Load_Data(train_data,test_data)
File "deepRAM.py", line 473, in Load_Data
train1,valid1,train2,valid2,train3,valid3,alldataset,sequences=chipseq.openFile()
File "deepRAM.py", line 318, in openFile
train_dataset.append([seqtopad(row[0],self.motiflen),[int(row[1])]])
File "deepRAM.py", line 36, in seqtopad
if i-motlen+1<len(sequence) and sequence[i-motlen+1]=='N' or ilen(sequence)+motlen-2:
IndexError: string index out of range

I am not sure if the sequence length should be greater than or less than a specific length. Thanks in advance.

Hello. I got some syntaxError

Hello, I am learning from DeepRAM for annotation or find motif.
I think this programs very helpful for me.

But, when I try to train as follow your command, i got some syntax error in deepRAM.py

python deepRAM.py --train_data CLIP_train.gz --test_data CLIP_test.gz --data_type RNA --train True --evaluate_performance True --model_path DeepBind.pkl --out_file prediction.txt --Embedding False --Conv True --RNN False --conv_layers 1

File "deepRAM.py", line 276
x=x @self.wHidden
^
SyntaxError: invalid syntax

Please help me. thank you

AttributeError: 'Rectangle' object has no property 'normed'

matplotlib (3.2.1)
I execute the following:
python deepRAM.py --test_data CLIP_test.gz --data_type RNA --predict_only True --model_path DeepBind.pkl --motif True --motif_dir motifs --tomtom_dir meme-5.1.1/src/tomtom --out_file prediction.txt --Embedding False --Conv True --RNN False --conv_layers 1
cuda:0
False
Load Data
Predicting sequence specificities
AUC on test data = 0.7085750683239377
torch.Size([10000, 16, 78])
(16, 4, 24)
plot motif fig motifs
Filter 0
plot logo
Filter 1
plot logo
Filter 2
plot logo
Filter 3
plot logo
Filter 4
plot logo
Filter 5
plot logo
Filter 6
plot logo
Filter 7
plot logo
Filter 8
plot logo
Filter 9
plot logo
Filter 10
plot logo
Filter 11
plot logo
Filter 12
plot logo
Filter 13
plot logo
Filter 14
plot logo
Filter 15
plot logo
The output directory 'motifs/tomtom' already exists.
Its contents will be overwritten.
Processing query 1 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.980392
Processing query 2 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.980392
Processing query 3 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=1
Processing query 4 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.827383
Processing query 5 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.86333
Processing query 6 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.980392
Processing query 7 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.975416
Processing query 8 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.905859
Processing query 9 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.980392
Processing query 10 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=1
Processing query 11 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.878533
Processing query 12 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.94579
Processing query 13 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.995172
Processing query 14 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.980392
Processing query 15 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.975365
Processing query 16 out of 16
Estimating pi_0 from all 102 observed p-values.
Estimating pi_0.
Estimated pi_0=0.980392
motifs/tomtom/tomtom.txt motifs_database/Ray2013_rbp_RNA.meme
Traceback (most recent call last):
File "deepRAM.py", line 982, in
main()
File "deepRAM.py", line 980, in main
run_deepRAM(args)
File "deepRAM.py", line 914, in run_deepRAM
Test_Motifs()
File "deepRAM.py", line 755, in Test_Motifs
detect_motifs(model,seqRNA , data, motif_dir)
File "deepRAM.py", line 774, in detect_motifs
get_motif(layer1_para, filter_outs, test_seqs, dir1 = output_dir,embd=embedding,data=data_type,kmer=kmer_len,s=stride,tomtom=tomtom_dir)
File "/scratch/deepRAM/extract_motifs.py", line 698, in get_motif
get_motif_fig(filter_weights, filter_outs, out_dir, testing, sample_i)
File "/scratch/deepRAM/extract_motifs.py", line 635, in get_motif_fig
fmean, fstd = plot_score_density(np.ravel(filter_outs[:,:, f]), '%s/filter%d_dens.pdf' % (out_dir,f))
File "/scratch/deepRAM/extract_motifs.py", line 545, in plot_score_density
sns.distplot(f_scores, kde=False)
File "/usr/lib/python3/dist-packages/seaborn/distributions.py", line 214, in distplot
color=hist_color, **hist_kws)
File "/scratch/.local/lib/python3.6/site-packages/matplotlib/init.py", line 1565, in inner
return func(ax, *map(sanitize_sequence, args), **kwargs)
File "/scratch/.local/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 6808, in hist
p.update(kwargs)
File "/scratch/.local/lib/python3.6/site-packages/matplotlib/artist.py", line 1006, in update
ret = [_update_property(self, k, v) for k, v in props.items()]
File "/scratch/.local/lib/python3.6/site-packages/matplotlib/artist.py", line 1006, in
ret = [_update_property(self, k, v) for k, v in props.items()]
File "/scratch/.local/lib/python3.6/site-packages/matplotlib/artist.py", line 1002, in _update_property
.format(type(self).name, k))
AttributeError: 'Rectangle' object has no property 'normed'

About one-hot encoding

Thanks for the nice work. We are trying to make your work into an ML problem set for our class.

I have a question about one-hot encoding code here

if i-motlen+1<len(sequence) and sequence[i-motlen+1]=='N' or i<motlen-1 or i>len(sequence)+motlen-2:

It seems that the one-hot encoding code set the first few and last few sequences to 0.25. And the length of the sequence that is set to 0.25 is equal to motiflen, I wonder what is the reason for that. I also read the paper, but did not see an explanation for this choice. Is this something standard to do, and where can I read more about this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.