Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SquigglePlot.py does not result in anything #35

Open
sem0036 opened this issue Apr 23, 2020 · 13 comments
Open

SquigglePlot.py does not result in anything #35

sem0036 opened this issue Apr 23, 2020 · 13 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@sem0036
Copy link

sem0036 commented Apr 23, 2020

Hello, after running this command python SquigglePlot.py -p /home/lab/Nano/lytic.fast5 it seems as if it is working and says "Done" but I am unable to see anything. I have tried to save .pdf and save_path and nothing shows up. What could I be doing wrong?

@Psy-Fer
Copy link
Owner

Psy-Fer commented Apr 24, 2020

Hello,

Is it a multi-fast5 file? (multiple raw signals in a single file, usually with a file size of 80mb or higher)
If so could you try running the same command with the -m flag added?

so something like
python SquigglePlot.py -p /home/lab/Nano/lytic.fast5 -m

Let me know how that goes :)

(I need to switch multi-fast5 on as default, i'll add it to my TODO list)
Cheers,
James

@Psy-Fer Psy-Fer self-assigned this Apr 24, 2020
@Psy-Fer Psy-Fer added bug Something isn't working help wanted Extra attention is needed labels Apr 24, 2020
@sem0036
Copy link
Author

sem0036 commented Apr 24, 2020

Thank you for the quick response! The command you gave me additionally says "done" lab@csm-minionpc:~/SquiggleKit$ python SquigglePlot.py -p /home/lab/SquiggleKit/lytic.fast5 -m --save lytic.pdf --save_path ~/img Done after the common but nothing results from the command. I'm sure I might be missing something but I'm not getting any error messages so I don't know what to fix in terms of image generation.

@Psy-Fer
Copy link
Owner

Psy-Fer commented Apr 28, 2020

That's weird.

I'll run some tests and see if I can track this down.
I'll get back to you soon.

James

@sem0036
Copy link
Author

sem0036 commented Apr 28, 2020

I managed to just generate signals using Squiggle Pull because I ultimately wanted to use Motif Seq. I managed to get Motif Seq running (mostly, I guess, that's why I'm here haha). However, I'm getting the following output, and I don't really know where to go with it.

command python3 MotifSeq.py -s lytic.tsv -i 19_kmer.fa > lytic_19.fa
(do I have to create a model using scrappie? On full documentation is goes through this path, but on the quick start is allows just a kmer file and signal file, is this the possible issue?)
and this is what I get: `**********************************************************

  • z-score, p-value, probability, etc. are based on *
  • preliminary experimental modeling only             *
    
  •            Use at own risk                         *
    

python3: Unrecognised base 85 in read
Traceback (most recent call last):
File "MotifSeq.py", line 521, in
main()
File "MotifSeq.py", line 156, in main
model, m_order, L = convert_fasta(args.fasta_input, args.scrappie_model)
File "MotifSeq.py", line 398, in convert_fasta
signal = scrappy.sequence_to_squiggle(l, model=mod).data(as_numpy=True, sloika=False)
File "/home/lab/.local/lib/python3.5/site-packages/scrappy/init.py", line 448, in sequence_to_squiggle
raise RuntimeError('An unknown error occurred whilst encoding sequence.')
RuntimeError: An unknown error occurred whilst encoding sequence.
Segmentation fault (core dumped)`

Sorry for all the questions.

@sem0036
Copy link
Author

sem0036 commented Apr 28, 2020

Sorry, the command I used was actually
python3 MotifSeq.py -s lytic.tsv -i 19_kmer.fa > lytic_19.tsv
my bad for the typo

@Psy-Fer
Copy link
Owner

Psy-Fer commented Apr 29, 2020

Hey,
Sorry for the bugs.
I've been meaning to do an overhaul.
But yes, I moved scrappie into MotifSeq to make it a little easier.

Otherwise, check the structure of your 19_kmer.fa file, and ensure that is only has LF not CRLF or CR at the end of each line. ie, only ends with \n not \r\n or \r (windows and mac respectively do this with most editors). It looks like scrappie is having a having a hard time reading the file, which looks to be mostly caused by the last character of the sequence.

Let me know how that goes, or if you need me to elaborate more on how to fix that.

Also, no worries about the questions. We ask until we know, that's what makes us scientists :)

@sem0036
Copy link
Author

sem0036 commented Apr 29, 2020

I've seemingly gotten everything to start working! One last question, do you think MotifSeq would ever be able to incorporate looking at RNA?

@Psy-Fer
Copy link
Owner

Psy-Fer commented Apr 30, 2020

Oh great.

Yea, it already can look at RNA.
You just have to change the flag for which scrapie model to use. However it won't give you bit probability, as I have not modelled that.

@sem0036
Copy link
Author

sem0036 commented Apr 30, 2020

When I try to generate the RNA model and incorporate that into the MotifSeq.py it tells me IndexError: list index out of range. Without modeling and just using the .fa file it will run. What could I be doing wrong now?

@Psy-Fer
Copy link
Owner

Psy-Fer commented May 1, 2020

Can you show me the command you used for that?

@Jenny-dan
Copy link

Hello,

I meet the same problem.
After I enter the command:
(SquiggleKit-env) dzha@DESKTOP-4U9JHDU:/mnt/d/ape/Squigglekit$ python SquigglePlot.py -i /mnt/d/ape/SquiggleKit/example/test.fast5

It returns nothing but
Done(SquiggleKit-env) dzha@DESKTOP-4U9JHDU:/mnt/d/ape/Squigglekit$
What could I do?

Thanks!

@Psy-Fer
Copy link
Owner

Psy-Fer commented Jun 16, 2020

Hello,

I'll have a look and get back to you soon.
Sorry for the Inconvenience.

James

@Psy-Fer
Copy link
Owner

Psy-Fer commented Jul 1, 2020

Hello,

I ran the following command on my Ubuntu 18.04 system

python3 SquigglePlot.py -i example/test.fast5

inside the repo folder, and it works.

Is your system set up to draw the plots using matplotlib? If it is Linux, you may need to set up Tk/Tkinter to be used with matplotlib.
If it is windows or mac, i'm not really sure off the top of my head.

I would first check to see if you can plot anything with the same python environment.

Try running something like

import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()

and see if it opens a plot window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants