TheJacksonLaboratory/Picky

use Minimap2 aligner

Closed this issue · 5 comments

Hi,

I want to use Picky for my Minimap2 generated .sam file and I try this:

export PICKY=/share/ScratchGeneral/tingon/SAPCS/Long_read/Picky/src/picky.pl
export RUN=LongRead

STEP 2 call SVs - CHANGED

time (cat ${RUN}.minimap2.sam | ${PICKY} callSV --oprefix ${RUN} --exclude=chrM)

However, I got the following error to ask me to provide fasta file. Could you suggest any ways for me to solve that? Did I miss anything?

Please specify the fastq files

/share/ScratchGeneral/tingon/SAPCS/Long_read/Picky/src/picky.pl callSV --in --fastq --lastpara [--genome --removehomopolymerdeletion] [--sam] [--exlucde [--exlucde ]]

--oprefix STR prefix for output files
--fastq STR .fastq file
--lastpara STR lastal parameters used
--removehomopolymerdeletion
exclude DEL and INDEL possibly affected by homopolymer
--genome STR genome sequence in .fasta file
--sam flag to output .sam file
--exclude STR exclude SV invovling specified chromosome
(specify each chromosome with --exclude individually)
--multiloci report SVs on best alignment of multi-loci aligments

Thank you very much!

I have also been encountering this issue when I have been trying to use alignments produced by NGMLR! The suggested edits to the script produced by Picky produced an equivalent Please specify the fastq files error.

I have tried to resolve this issue by providing the reference fastq file after a --fastq flag as suggested in the error message, but that has resulted in a different error message saying Can't use an undefined value as an ARRAY reference at /Picky-0.3.a/src/callSV.pm line 316, <STDIN> line 1.

Line 316 of callSV.pm is if (0==scalar(@{$readRef->{candidates}})) { # loop }

Do you have any suggestions on how we can resolve these errors? Thank you so much!

Sorry that I have missed out the commit for samToAlign.pm.
Please get the new commit and let me know if you still run into issue.

Thank you so much for your response! Here's what I've found so far:

When I downloaded the new commit, and generated a new processing script from the ./picky script command and applied the suggested edits, I ran into the same errors. I decided to create the .align file separately from the Step 2 command by using ./picky.pl sam2align. This worked! I was able to generate the .align file after several minutes of this command running.

I used the newly created .align file to replace the ${RUN}.software.sam clause in Step 2 and found it works very quickly with zero errors! Inclusion of the --fastq and the --sam flags make no change in output. I did not try the inclusion of a LAST database because I do not have one. No errors occurred with either additions and only small changes in runtime were noticed.


So here is what I suggest to people who are using other aligners like Minimap2 or NGMLR:

When you have your .sam file, alignment.sam, you will need to generate the .align file by using the sam2align module provided (this may take some time depending on the size of your .sam file). Run:

cat alignment.sam | ./picky.pl sam2align > alignment.align

Then, change Step 2 so it looks like this:

time (cat alignment.align | ${PICKY} callSV --oprefix ${RUN} --exclude=chrM)

I removed the --fastq and the --sam portions from Step 2 because their addition or exclusion did not alter any of the results. You can add them back in and not have any errors, but your runtimes will increase with the inclusion of --fastq (from anecdotal evidence of trying this two times).

Thank you for providing the sam2align file! I am happy these issues have been resolved so I may continue to use this great software!

Thank you all for the help.
Running cat my_Minimap2.sam | ${PICKY} callSV --oprefix ${RUN} --exclude=chrM
give me the error message:
Can't use an undefined value as an ARRAY reference at /share/ScratchGeneral/tingon/SAPCS/Long_read/Picky/src/callSV.pm line 316, line 1.

However, using sam2align as suggested gave me the vcf file.

Thank you all again.

cat alignment.sam | ./picky.pl sam2align > alignment.align
new problem: "# ERROR: You sam file is not sorted by queryname. Consider: samtools sort -n"
Then , change script :
tail -n +2 alignment.sam | ./picky.pl sam2align > alignment.align

Step2-a:
time(cat alignment.align | ${PICKY} callSV --oprefix ${RUN} --exclude=chrM)
Step2-b:
time(cat alignment.align | ${PICKY} callSV --fastq fastqfile --oprefix ${RUN} --exclude=chrM --sam)

The difference between Step2-a and Step2-b is Step2-b's more time and two more files(sam and bed).