Sha256: 33d902b3804e16a50cc8283b9666156c019d2f586589d57daf5f23922f176551
Contents?: true
Size: 1.67 KB
Versions: 4
Compression:
Stored size: 1.67 KB
Contents
require 'blast_functions' require 'types' require 'chimeric_seqs' include ChimericSeqs ##################################################################### ## MAIN FUNCTION ##################################################################### def artifact?(seq, query, db_name, db_path, options, new_seqs) artifact = FALSE # UNMAPPED CONTIG DETECTION if query.nil? && seq.unmapped? #If seq is misassembled stop chimera analisys seq.hit = nil artifact = TRUE seq.type = UNMAPPED end if !query.nil? # MISASSEMBLED DETECTION if !artifact && misassembled_detection(query) #If seq is misassembled stop chimera analisys seq.hit = query.hits.first artifact = TRUE seq.type = MISASSEMBLED seq.warnings('ERROR#1') end # OVERLAPPING HSPS ON SUBJECT DETECTION =begin if !artifact hit_reference = query.hits.first.dup query, overlapping = overlapping_hsps_on_subject(query) if overlapping if query.hits.first.nil? seq.hit = hit_reference else seq.hit = query.hits.first end artifact = TRUE seq.type = OTHER seq.warnings('ERROR#2') end end =end # MULTIPLE HSP DETECTION if !artifact && multiple_hsps(query, 3) seq.hit = query.hits.first seq.warnings('ERROR#3') end # CHIMERA DETECTION if !artifact && !options[:chimera].include?('d') chimera = search_chimeras(seq, query, options, db_name, db_path) if !chimera.nil? new_seqs.concat(chimera) seq.db_name = db_name seq.type = CHIMERA artifact = TRUE end end end if artifact if $verbose > 1 puts seq.prot_annot_calification end seq.db_name = db_name seq.save_fasta = FALSE seq.ignore = TRUE end return artifact end
Version data entries
4 entries across 4 versions & 1 rubygems