enormandeau / snplift

Transfer coordinates across genomes
23 stars 1 forks source link

SNPLift should crash if genome is not indexed #5

Open bensutherland opened 10 months ago

bensutherland commented 10 months ago

Hi Eric & @SNPLift, I tried to run SNPLift but had not indexed the reference genomes, and SNPLift although warned me about the lack of indexing, did return a single value in the standard output reporting. This made it seem like it ran successfully, but it did not. It might be good to put in a flag that if the genomes aren't indexed to stop the run and not give outputs.

I indexed the ref genomes, re-ran, and it ran great!

Standard output to screen without the ref genomes being indexed:

./snplift 02_infos/snplift_config.sh

SNPLift v1.0.4
Start: 20231008_104651

SNPLift: Validating input files and dependencies

- Config file found
- Old genome found
- New genome found
- Input file found
- python3 is recent enough:
    needed: 3.5.0+; installed: 3.10.12
- R is recent enough:
    needed: 3.0.0+; installed: 4.1.2
- parallel is recent enough:
    needed: 20180101+; installed: 20210822
- bash is recent enough:
    needed: 4.0.0+; installed: 5.1.16
- bwa is recent enough:
    needed: 0.7.0+; installed: 0.7.17-r1198-dirty
- samtools is recent enough:
    needed: 1.10+; installed: 1.16.1

SNPLift: Using 20 CPUs

SNPLift: Skipping collinearity assessment

SNPLift: Skipping genome indexing
> NOTE: Use only if the genome is already indexed with 'bwa index'

SNPLift: Extracting positions from input file

SNPLift: Extracting flanking sequences around SNPs

SNPLift: Mapping flanking sequences on new genome

[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files
[E::bwa_idx_load_from_disk] fail to locate the index files

SNPLift: Extract features from alignments

SNPLift: Skipping visualization

SNPLift: Score markers based on extracted features

SNPLift: Getting coordinates of transferable SNPs

SNPLift: Writing output file with updated coordinates

SNPLift: Number of SNPs treated at each step

1069    Positions
0       Scores
1       Transferable

SNPLift: Percentage of transferred SNPs:

.093545%

SNPLift: Run completed

End: 20231008_104654

real    0m3.060s
user    0m36.019s
sys     0m34.068s

I ran it again after indexing the ref genomes, and received 96.2% transfer - very nice! Thank you, Ben

enormandeau commented 10 months ago

Hi Ben. Thanks for reporting this. I'll see how I can make it crash if something goes wrong.