Sha256: 0bd626f5a47644122f163cea8848f992db29b7550bf70a0df9076a65ad522057

Contents?: true

Size: 775 Bytes

Versions: 1

Compression:

Stored size: 775 Bytes

Contents

module NcRna
	
	def find_nc_rna(seq, blast_query)
		
		# used to detect if the sequence and the blast are from different query
		if seq.seq_name != blast_query.query_def
			raise "BLAST query name and sequence are different"
		end
		
		q=blast_query
		
		if (!q.hits[0].nil?) # There is match in blast.
			nc_annotations = "#{q.query_def}\t#{seq.seq_fasta.length}\t#{q.hits[0].acc}\tncRNA\tPutative ncRNA\t\t#{q.hits[0].e_val}\t#{q.hits[0].ident}\t\t\t\t#{q.hits[0].q_frame}\t#{q.hits[0].q_beg}\t#{q.hits[0].q_end}\t#{q.hits[0].s_beg.to_i}\t#{q.hits[0].s_end.to_i}\t#{q.hits[0].definition}\t"
			seq.annotate(:ncrna,nc_annotations,true)
		else
			unknown_annot = seq.get_annotations(:tcode_unknown).first
			seq.annotate(:tcode, unknown_annot[:message],true)
		end
	end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
full_lengther_next-0.0.5 lib/full_lengther_next/classes/nc_rna.rb