bash: PloidyPlot: command not found...
Hello,
I installed fastk and smudgeplot using conda. I run fastk successfully but I am having issues with running Ploidyplot, can you please help.
Thank you
Uh, the conda installation must be broken. I need to look into it. In the meantime, if you would install smudgeplot directly by cloning the repository and following the install instructions, it should work for you.
Thank you for bringing it to my attention!!!
Dear KamilSJaron,
Thank you very much for your reply. I have installed and run it but I am having issue with the last step to plot. This is the error message: error: unrecognized arguments: -col_ramp viridis
Please help. Thank you
Oh boy, to me it seems it's using a combination of the conda installation (from old times when -col_ramp was not a thing) and the new version of the python wrapper that does specify it for every run.
Would running it in a GitPod be an option for you? If you look here: https://thebgacademy.org/BGA23/Sessions/smudgeplot there are some instructions on how to do it (you basically click on that orange button, wait 5 mintues and you will have a smudgeplot env ready on a cloud)
Dear KamilSJaron,
Thank you. I have followed your youtube video on how to run the programme and I have installed the package but this is error I am getting. please help
(base) [Samaila@localhost AframomumAm]$ /nfs_fs/nfs4/Samaila/src/workspace/bin/smudgeplot.py hetmers -L 40 -t 4 --verbose -o Am_UDI297_k21_pairs Am_UDI297.ktab Running smudgeplot v0.4.0dev Task: hetmers Calling: hetmers (PloidyPlot kmer pair search) -oAm_UDI297_k21_pairs -e40 -T4 -v Am_UDI297.ktab
The input table is untrimmed and not symmetric
Trimming k-mers in table with count < 40 sh: Logex: command not found PloidyPlot: Something went wrong with command: Logex -T4 '.trim=A[40-]' Am_UDI297.ktab
Done! (base) [Samaila@localhost AframomumAm]$
Thank you very much
Dear KamilSJaron, I have resolved the issue in my earlier comment. I am now having a problem with smudgeplot. please help
(base) [Samaila@localhost exec]$ /nfs_fs/nfs4/Samaila/bin/smudgeplot.py plot -t As_UDI298 -o As_UDI298_k21_smudgeplot As_UDI298_k21_pairs_text.smu usage: smudgeplot plot [-h] [-o O] [-c C] [-t TITLE] [-ylim YLIM] [-col_ramp COL_RAMP] [--invert_cols] infile smudgefile n smudgeplot plot: error: the following arguments are required: smudgefile, n (base) [Samaila@localhost exec]$
Dear @yaradua, what was the solution to the earlier problem? WOuld you mind posting it? It seems there is another user that is having the same issue.
Regarding your current problem, the plotting function is now requiring to specify coverage. If you with to infer the 1n coverage instead, you need to run
smudgeplot.py all -t As_UDI298 -o As_UDI298_k21_smudgeplot As_UDI298_k21_pairs_text.smu
Which will both infer the coverage and plot the plot
Dear KamilSJaron,
Thanks for your replies. I used the script but this is what I get
(smudgeplot) [Samaila@localhost exec]$ /nfs_fs/nfs4/Samaila/bin/smudgeplot.py all -t As_UDI298 -o As_UDI298_k21_smudgeplot As_UDI298_k21_pairs_text.smu
Running smudgeplot v0.4.0dev
Task: all
Loading data
Masking errors using local agregation algorithm
Total kmers: 43375337
Genomic kmers: 25958807
Sequencing errors: 17416530
Fraction or errors: 0.402
Infering 1n coverage using grid algorihm
Traceback (most recent call last):
File "/nfs_fs/nfs4/Samaila/bin/smudgeplot.py", line 444, in <module>
main()
File "/nfs_fs/nfs4/Samaila/bin/smudgeplot.py", line 401, in main
centralities = test_coverage_range(cov_tab, args.cov_min, args.cov_max, smudge_size_cutoff)
File "/nfs_fs/nfs4/Samaila/bin/smudgeplot.py", line 296, in test_coverage_range
cov_centralities.append(get_centrality(smudge_container, cov))
File "/nfs_fs/nfs4/Samaila/bin/smudgeplot.py", line 288, in get_centrality
return(fmean(centralities, weights=freqs))
TypeError: fmean() got an unexpected keyword argument 'weights'
Hi @yaradua , I am talking about this...
(base) [Samaila@localhost AframomumAm]$ /nfs_fs/nfs4/Samaila/src/workspace/bin/smudgeplot.py hetmers -L 40 -t 4 --verbose -o Am_UDI297_k21_pairs Am_UDI297.ktab Running smudgeplot v0.4.0dev Task: hetmers Calling: hetmers (PloidyPlot kmer pair search) -oAm_UDI297_k21_pairs -e40 -T4 -v Am_UDI297.ktab
The input table is untrimmed and not symmetric
Trimming k-mers in table with count < 40 sh: Logex: command not found PloidyPlot: Something went wrong with command: Logex -T4 '.trim=A[40-]' Am_UDI297.ktab
What did go wrong? Was it that you did not install FastK globally?
Dear KamilSJaron,
Yes, there was a problem with the installation of the fastk. I learnt that the fastk need to be install in a bin directory.
It is working now. The problem now is with the plot as stated in my last comment.
Thank you.
On Thu, Oct 24, 2024, 2:56 PM Kamil S. Jaron @.***> wrote:
Hi @yaradua https://github.com/yaradua , I am talking about this...
(base) @.*** AframomumAm]$ /nfs_fs/nfs4/Samaila/src/workspace/bin/smudgeplot.py hetmers -L 40 -t 4 --verbose -o Am_UDI297_k21_pairs Am_UDI297.ktab Running smudgeplot v0.4.0dev Task: hetmers Calling: hetmers (PloidyPlot kmer pair search) -oAm_UDI297_k21_pairs -e40 -T4 -v Am_UDI297.ktab
The input table is untrimmed and not symmetric
Trimming k-mers in table with count < 40 sh: Logex: command not found PloidyPlot: Something went wrong with command: Logex -T4 '.trim=A[40-]' Am_UDI297.ktab
What did go wrong? Was it that you did not install FastK globally?
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2434451128, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAEJFYW2J3N6T54C5QADZ5CKZ5AVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZUGQ2TCMJSHA . You are receiving this because you were mentioned.Message ID: @.***>
Reagrding the error you see, it's about the version of your python. Needs to be >=3.11. See https://docs.python.org/3/library/statistics.html
Dear KamilSJaron,
Thank you for your time and reply. I am using my lab HPC and I don't have the power to change the version of the phyton. Can I please send you the input files to run the smudge plot?
Thank you
On Thu, Oct 24, 2024, 3:01 PM Kamil S. Jaron @.***> wrote:
Reagrding the error you see, it's about the version of your python. Needs to be >=3.11. See https://docs.python.org/3/library/statistics.html
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2434458938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAEORCB6XOCWJPQAJAZTZ5CLMFAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZUGQ2TQOJTHA . You are receiving this because you were mentioned.Message ID: @.***>
Dear KamilSJaron,
attached are the files.
Thank you very much
On Thu, Oct 24, 2024 at 10:06 AM SAMAILA YARADUA @.***> wrote:
Dear KamilSJaron,
Thank you for your time and reply. I am using my lab HPC and I don't have the power to change the version of the phyton. Can I please send you the input files to run the smudge plot?
Thank you
On Thu, Oct 24, 2024, 3:01 PM Kamil S. Jaron @.***> wrote:
Reagrding the error you see, it's about the version of your python. Needs to be >=3.11. See https://docs.python.org/3/library/statistics.html
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2434458938, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAEORCB6XOCWJPQAJAZTZ5CLMFAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZUGQ2TQOJTHA . You are receiving this because you were mentioned.Message ID: @.***>
Can you run smudgeplot in GitPod? If you click on this: https://gitpod.io/#https://github.com/BGAcademy23/smudgeplot it will (eventually) load you a fully functioning environment with smudgeplot directly accessible form your browsers. Nothing is needed.
I tried running it on GitPod, but I am having difficulties. My fastq files are on our HPC server, and I don't know how to import them on GitPod.
I need your help running it for me. I want to see the result.
Thank you
On Thu, Oct 24, 2024 at 10:28 AM Kamil S. Jaron @.***> wrote:
Can you run smudgeplot in GitPod? If you click on this: https://gitpod.io/#https://github.com/BGAcademy23/smudgeplot it will (eventually) load you a fully functioning environment with smudgeplot.
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2434505897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAELLTMQOTM2I743G5ULZ5COTBAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZUGUYDKOBZG4 . You are receiving this because you were mentioned.Message ID: @.***>
Ah, you don't need to upload there the fastq files, you can upload them just the .smu files that are tiny and do the plotting there...
K
Yeah, I am already on it. do i have to download and install the smudgeplot in the gidpod?
On Thu, Oct 24, 2024 at 10:40 AM Kamil S. Jaron @.***> wrote:
Ah, you don't need to upload there the fastq files, you can upload them just the .smu files that are tiny and do the plotting there...
K
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2434527968, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAEPJO7ZXED5QS7A5S73Z5CP6FAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZUGUZDOOJWHA . You are receiving this because you were mentioned.Message ID: @.***>
Nope, all it there running.
Dear KamilSJaron,
I am sorry that I cannot run it on the gitpod. Please run it using the files I sent to you. I am to submit a report on it.
Thank you
On Thu, Oct 24, 2024, 3:50 PM SAMAILA YARADUA @.***> wrote:
Yeah, I am already on it. do i have to download and install the smudgeplot in the gidpod?
On Thu, Oct 24, 2024 at 10:40 AM Kamil S. Jaron @.***> wrote:
Ah, you don't need to upload there the fastq files, you can upload them just the .smu files that are tiny and do the plotting there...
K
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2434527968, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAEPJO7ZXED5QS7A5S73Z5CP6FAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZUGUZDOOJWHA . You are receiving this because you were mentioned.Message ID: @.***>
huhhhh
gitpod /workspace/smudgeplot (main) $ smudgeplot.py all
/C:/Users/PC/Desktop/As_UDI298_k21_pairs_text.smu -o
As_UDI298_k21_smudgeplot
Traceback (most recent call last):
File "/workspace/bin/smudgeplot.py", line 5, in
I finally run it but this error came
On Thu, Oct 24, 2024 at 11:17 AM SAMAILA YARADUA @.***> wrote:
Dear KamilSJaron,
I am sorry that I cannot run it on the gitpod. Please run it using the files I sent to you. I am to submit a report on it.
Thank you
On Thu, Oct 24, 2024, 3:50 PM SAMAILA YARADUA @.***> wrote:
Yeah, I am already on it. do i have to download and install the smudgeplot in the gidpod?
On Thu, Oct 24, 2024 at 10:40 AM Kamil S. Jaron @.***> wrote:
Ah, you don't need to upload there the fastq files, you can upload them just the .smu files that are tiny and do the plotting there...
K
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2434527968, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAEPJO7ZXED5QS7A5S73Z5CP6FAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZUGUZDOOJWHA . You are receiving this because you were mentioned.Message ID: @.***>
Dear KamilSJaron,
I am sorry for too much messages . I fanally run it on the gitpod. but i am having this issue
(smudgeplot) gitpod /workspace $ /workspace/src/smudgeplot/exec/smudgeplot.py all /workspace/.gitpod/Am_UDI297_k21_pairs_text.smu -o As_UDI298_k21_smudgeplot Running smudgeplot v0.4.0dev Task: all
Loading data
Masking errors using local agregation algorithm Total kmers: 41852266 Genomic kmers: 36589280 Sequencing errors: 5262986 Fraction or errors: 0.126 Infering 1n coverage using grid algorihm Best coverage to precsion of one tenth: 38.95 Best coverage to precision of one hundreth: 38.8
Inferred coverage: 38.80000000000005 Detected smudges / sizes (As_UDI298_k21_smudgeplot + "_smudge_sizes.txt):" ['AAB', 'AAAB', 'AABB', 'AAABB', 'AAAABB', 'AAABBB'] [0.1273, 0.0358, 0.3464, 0.1354, 0.0492, 0.0344]
Plotting sh: 1: centrality_plot.R: not found Calling: smudgeplot_plot.R -i "As_UDI298_k21_smudgeplot_masked_errors_smu.txt" -s "As_UDI298_k21_smudgeplot_smudge_sizes.txt" -n 38.8 -o "As_UDI298_k21_smudgeplot" -col_ramp "viridis" sh: 1: smudgeplot_plot.R: not found
Thank you.
On Thu, Oct 24, 2024 at 11:27 AM SAMAILA YARADUA @.***> wrote:
huhhhh
gitpod /workspace/smudgeplot (main) $ smudgeplot.py all /C:/Users/PC/Desktop/As_UDI298_k21_pairs_text.smu -o As_UDI298_k21_smudgeplot Traceback (most recent call last): File "/workspace/bin/smudgeplot.py", line 5, in
import numpy as np ModuleNotFoundError: No module named 'numpy' gitpod /workspace/smudgeplot (main) $ pip install numpy I finally run it but this error came
On Thu, Oct 24, 2024 at 11:17 AM SAMAILA YARADUA @.***> wrote:
Dear KamilSJaron,
I am sorry that I cannot run it on the gitpod. Please run it using the files I sent to you. I am to submit a report on it.
Thank you
On Thu, Oct 24, 2024, 3:50 PM SAMAILA YARADUA @.***> wrote:
Yeah, I am already on it. do i have to download and install the smudgeplot in the gidpod?
On Thu, Oct 24, 2024 at 10:40 AM Kamil S. Jaron < @.***> wrote:
Ah, you don't need to upload there the fastq files, you can upload them just the .smu files that are tiny and do the plotting there...
K
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2434527968, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAEPJO7ZXED5QS7A5S73Z5CP6FAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZUGUZDOOJWHA . You are receiving this because you were mentioned.Message ID: @.***>
I am fascinated how did you manage to get all those errors!? I am pretty sure the GitPod just works...
Would you like to have a call one day to get it fixed? I think you miss just something very simple and then you will be all good. If so, what time would you like?
Your problems made me think I could organise once a month dropin sessions for smudgeplot help, so I will likely advertise it publicly...
Dear KamilSJaron,
Thank you for your contribution to knowledge. I am always available for the call.
Thank you.
On Tue, Oct 29, 2024 at 11:37 AM Kamil S. Jaron @.***> wrote:
I am fascinated how did you manage to get all those errors!? I am pretty sure the GitPod just works...
Would you like to have a call one day to get it fixed? I think you miss just something very simple and then you will be all good. If so, what time would you like?
Your problems made me think I could organise once a month dropin sessions for smudgeplot help, so I will likely advertise it publicly...
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2443572294, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAEJOYDR5XPJKQM7LQ4DZ55CLPAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBTGU3TEMRZGQ . You are receiving this because you were mentioned.Message ID: @.***>
What about Friday 9:00 of UK time? Do you have email I could send you an invite to?
Yes, it is okay for me. My email address is @.***
Thank you for this opportunity.
On Tue, Oct 29, 2024 at 12:10 PM Kamil S. Jaron @.***> wrote:
What about Friday 9:00 of UK time? Do you have email I could send you an invite to?
— Reply to this email directly, view it on GitHub https://github.com/KamilSJaron/smudgeplot/issues/165#issuecomment-2443645208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJFPAELPOM3DVRLW34QBVADZ55GHNAVCNFSM6AAAAABQH4TKJSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBTGY2DKMRQHA . You are receiving this because you were mentioned.Message ID: @.***>
Uh, that is annoying. It masked your email... just email me at kj11 at sanger.ac.uk please.
I think the problem is centrality_plot.R and smudgeplot_plot.R are not in your /workspace/bin folder . If you follow the tutorial you should have smudgeplot.py and the dependency scripts installed and can just run 'smudgeplot.py' (without pointing to /workspace/src/smudgeplot/exec/smudgeplot.py). Alternatively you could copy the two R scripts from /workspace/src/smudgeplot/exec/ to your working directory and I think your current approach would then work.
Dear Dear KamilSJaron,
I am wondering if this bug has been fixed? I have recently tried running smudgeplot with FastK both with the conda environment and through the git hub installs. However, I ran into an issue with PloidyPlot, I.e:
(genomescope) [mbars7@hpclogin01(Ada) fastk]$ python3 /gpfs01/home/mbars7/smudgeplot/exec_scripts/smudgeplot.py hetmers CPYR001.hifi_reads.ktab -L 88 -t 4 -o output --verbose
Running smudgeplot v0.4.0dev
Task: hetmers
Calling: hetmers (PloidyPlot kmer pair search) -ooutput -e88 -T4 -v CPYR001.hifi_reads.ktab
PloidyPlot: Table part ./.CPYR001.hifi_reads.ktab.1 is missing ?
I have checked the smudgeplot.py script and it doesn't seem like it handles multiple ktab files? But I also made a copy of the original Ktab file to create ktab.1 but it doesn't recognise it... So I am slightly confused on what to do to solve this and would really appreciate any advice :) Thank you so much!
I just tested the the bioconda installation works just fine. I am not sure what caused the original problem, but due to lack of reproducibility, I am closing this issue