Sha256: 5d8d516829da02995c0a68f39f7c1abf772d5a208b6711ef9d91ac35effe59d2
Contents?: true
Size: 600 Bytes
Versions: 8
Compression:
Stored size: 600 Bytes
Contents
#!/usr/bin/env ruby require 'scbi_fasta' if ARGV.count < 3 puts "#{$0} FASTA_FILE OUTPUT_NAME SEQS_PER_FILE_COUNT" exit end fastq = ARGV.shift output_name = ARGV.shift split_by = ARGV.shift.to_i file_index=1 out=File.new("#{output_name}#{file_index}.fasta",'w') fqr=FastaQualFile.new(fastq) count = 0 fqr.each do |seq_name,seq_fasta,comments| if (count >= split_by) count=0 file_index +=1 out.close out=File.new("#{output_name}#{file_index}.fasta",'w') end out.puts(">#{seq_name} #{comments}") out.puts(seq_fasta) count +=1 end out.close if out fqr.close
Version data entries
8 entries across 8 versions & 1 rubygems