Sha256: 5d369dc36f9ea7a525a7e8c7a4cd604fd66aa26d4cf33ee4f6fec208a610fe91

Contents?: true

Size: 696 Bytes

Versions: 28

Compression:

Stored size: 696 Bytes

Contents

#!/usr/bin/env ruby

require 'scbi_fastq'

class Array
 def count
	self.length
 end

end

if ARGV.count != 3
  puts "#{$0} FASTQ OUTPUT_NAME SEQ_NAMES_FILE"
  exit
else
  
  fasta = ARGV.shift
  output_name = ARGV.shift
  seqs_file=ARGV.shift

  seqs=[]

  f=File.open(seqs_file).each_line do |line|
  	seqs.push line.strip.chomp
  end
  puts seqs.join(';')
  
	fqr=FastqFile.new(fasta)
	
	output_fastq=FastqFile.new(output_name+'.fastq','w')

	fqr.each do |seq_name,seq_fasta,seq_qual|
  	if seqs.index(seq_name)
  	    output_fastq.write_seq(seq_name,seq_fasta,seq_qual)
  			seqs.delete(seq_name)
  			if seqs.empty?
  			  break
			  end
  	end
  end
  
  output_fastq.close
  fqr.close

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
seqtrimnext-2.0.68 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.66 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.62 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.61 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.60 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.59 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.57 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.56 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.55 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.54 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.52 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.51 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.50 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.49 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.48 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.46 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.45 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.42 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.41 bin/extract_seqs_from_fastq.rb
seqtrimnext-2.0.39 bin/extract_seqs_from_fastq.rb