Hi, can you give me an idea how to proceed with this; I have an existing series of perl scripts
(a few thousand lines), to perform variant calling from cram files. Is there anyway I can translate my current approach onto the Dnanexus system? Thanks
It depends on how many cram files you need to run on. If just a few, you could use cloud workstation to run the scripts. If there are several, you could wrap your scripts in a DNAnexus applet. Heres some documentation on how to do that https://documentation.dnanexus.com/developer/apps/intro-to-building-apps. I'd definitely check out dx-app-wizard if you go that route, and please ff to keep writing in for help.
Thanks for your reply. I have 1000 in 1 batch and 4000 in another. I was told perl is not available on the system and I don't understand how I can use my existing perl which calls utilities like picard, samtools etc via filenames in an object type way, it seems incompatible to me.
That said, if I remember correctly (its been >10 years!), its really easy to make system calls with perl (or you could make a bash script). The way I would do this would be to have the bash script you build with dx-app-wizard (in src) call your perl program. Then your perl program could call existing apps on DNAnexus (youd have to add "dx run <app name (e.g. Picard)>" in your script. After a bit of googling -- system('dx run app-swiss_army_knife -iin <input file> -icmd Picard <picard arguments> out <outfile> .
Hi, thanks for your answers. Running my perl scripts locally and modifying the perl system calls to a dx run formulation seems the way to go. I am using "-y --wait" with dx to remove the interaction and make the system cmd wait until the dx run has finished, so the perl script can function properly.
Comments
7 comments
It depends on how many cram files you need to run on. If just a few, you could use cloud workstation to run the scripts. If there are several, you could wrap your scripts in a DNAnexus applet. Heres some documentation on how to do that https://documentation.dnanexus.com/developer/apps/intro-to-building-apps. I'd definitely check out dx-app-wizard if you go that route, and please ff to keep writing in for help.
Thanks for your reply. I have 1000 in 1 batch and 4000 in another. I was told perl is not available on the system and I don't understand how I can use my existing perl which calls utilities like picard, samtools etc via filenames in an object type way, it seems incompatible to me.
Ok, apps are what you are going to want to use.
That said, if I remember correctly (its been >10 years!), its really easy to make system calls with perl (or you could make a bash script). The way I would do this would be to have the bash script you build with dx-app-wizard (in src) call your perl program. Then your perl program could call existing apps on DNAnexus (youd have to add "dx run <app name (e.g. Picard)>" in your script. After a bit of googling -- system('dx run app-swiss_army_knife -iin <input file> -icmd Picard <picard arguments> out <outfile> .
Documentation here:
https://documentation.dnanexus.com/user/running-apps-and-workflows/running-apps-and-applets
(obviously, close the quotes and parentheses) :)
Another option would be to dockerize your perl scripts and the dependencies. Happy to talk more about either approach.
Hi, thanks for your answers. Running my perl scripts locally and modifying the perl system calls to a dx run formulation seems the way to go. I am using "-y --wait" with dx to remove the interaction and make the system cmd wait until the dx run has finished, so the perl script can function properly.
That makes sense to me, please ff to ping me if youd like to discuss further.
Please sign in to leave a comment.