Skip to content

Commit

Permalink
Merge 9939576 into b03b41c
Browse files Browse the repository at this point in the history
  • Loading branch information
marehr committed Mar 2, 2021
2 parents b03b41c + 9939576 commit 08f7238
Show file tree
Hide file tree
Showing 34 changed files with 258 additions and 294 deletions.
4 changes: 2 additions & 2 deletions doc/tutorial/read_mapper/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ Additionally, there should be no more debug output.
Try to write all available information into the SAM file. We can introduce a naive mapping quality by using
`mapping quality = 60 + alignment score`.

This is the alignment_file_output construction:
This is the sam_file_output construction:
\hint
\snippet doc/tutorial/read_mapper/read_mapper_step4.cpp alignment_file_output
\snippet doc/tutorial/read_mapper/read_mapper_step4.cpp sam_file_output
\endhint
\endassignment
\solution
Expand Down
18 changes: 9 additions & 9 deletions doc/tutorial/read_mapper/read_mapper_step4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ void map_reads(std::filesystem::path const & query_path,

seqan3::sequence_file_input query_file_in{query_path};

//! [alignment_file_output]
seqan3::alignment_file_output sam_out{sam_path, seqan3::fields<seqan3::field::seq,
seqan3::field::id,
seqan3::field::ref_id,
seqan3::field::ref_offset,
seqan3::field::alignment,
seqan3::field::qual,
seqan3::field::mapq>{}};
//! [alignment_file_output]
//! [sam_file_output]
seqan3::sam_file_output sam_out{sam_path, seqan3::fields<seqan3::field::seq,
seqan3::field::id,
seqan3::field::ref_id,
seqan3::field::ref_offset,
seqan3::field::alignment,
seqan3::field::qual,
seqan3::field::mapq>{}};
//! [sam_file_output]

seqan3::configuration const search_config = seqan3::search_cfg::max_error_total{
seqan3::search_cfg::error_count{errors}} |
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/sam_file/sam_file_snippets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main()
//![writing]
auto filename = std::filesystem::temp_directory_path()/"out.sam";

seqan3::alignment_file_output fout{filename, seqan3::fields<seqan3::field::flag, seqan3::field::mapq>{}};
seqan3::sam_file_output fout{filename, seqan3::fields<seqan3::field::flag, seqan3::field::mapq>{}};

size_t mymapq{0};
seqan3::sam_flag flag{seqan3::sam_flag::unmapped};
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/sam_file/sam_file_solution3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ int main()
"AGAAAGAGCGAGGCTATTTTAGCGAGTTA"_dna4};

auto tmp_dir = std::filesystem::temp_directory_path();
seqan3::alignment_file_output fout{tmp_dir/"my.sam", seqan3::fields<seqan3::field::id, seqan3::field::seq>{}};
seqan3::sam_file_output fout{tmp_dir/"my.sam", seqan3::fields<seqan3::field::id, seqan3::field::seq>{}};

for (size_t i = 0; i < ids.size(); ++i)
{
Expand Down
6 changes: 3 additions & 3 deletions include/seqan3/io/alignment_file/format_bam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class format_bam : private detail::format_sam_base
typename mate_type,
typename tag_dict_type>
void write_alignment_record([[maybe_unused]] stream_type & stream,
[[maybe_unused]] alignment_file_output_options const & options,
[[maybe_unused]] sam_file_output_options const & options,
[[maybe_unused]] header_type && header,
[[maybe_unused]] seq_type && seq,
[[maybe_unused]] qual_type && qual,
Expand Down Expand Up @@ -588,7 +588,7 @@ inline void format_bam::read_alignment_record(stream_type & stream,
std::swap(cigar_vector, tmp_cigar_vector);
}

//!\copydoc alignment_file_output_format::write_alignment_record
//!\copydoc sam_file_output_format::write_alignment_record
template <typename stream_type,
typename header_type,
typename seq_type,
Expand All @@ -601,7 +601,7 @@ template <typename stream_type,
typename mate_type,
typename tag_dict_type>
inline void format_bam::write_alignment_record([[maybe_unused]] stream_type & stream,
[[maybe_unused]] alignment_file_output_options const & options,
[[maybe_unused]] sam_file_output_options const & options,
[[maybe_unused]] header_type && header,
[[maybe_unused]] seq_type && seq,
[[maybe_unused]] qual_type && qual,
Expand Down
8 changes: 4 additions & 4 deletions include/seqan3/io/alignment_file/format_sam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class format_sam : private detail::format_sam_base
typename e_value_type,
typename bit_score_type>
void write_alignment_record(stream_type & stream,
alignment_file_output_options const & options,
sam_file_output_options const & options,
header_type && header,
seq_type && seq,
qual_type && qual,
Expand Down Expand Up @@ -339,7 +339,7 @@ inline void format_sam::write_sequence_record(stream_type & stream,
using default_align_t = std::pair<std::span<gapped<char>>, std::span<gapped<char>>>;
using default_mate_t = std::tuple<std::string_view, std::optional<int32_t>, int32_t>;

alignment_file_output_options output_options;
sam_file_output_options output_options;

write_alignment_record(stream,
output_options,
Expand Down Expand Up @@ -627,7 +627,7 @@ inline void format_sam::read_alignment_record(stream_type & stream,
std::swap(cigar_vector, tmp_cigar_vector);
}

//!\copydoc alignment_file_output_format::write_alignment_record
//!\copydoc sam_file_output_format::write_alignment_record
template <typename stream_type,
typename header_type,
typename seq_type,
Expand All @@ -641,7 +641,7 @@ template <typename stream_type,
typename e_value_type,
typename bit_score_type>
inline void format_sam::write_alignment_record(stream_type & stream,
alignment_file_output_options const & options,
sam_file_output_options const & options,
header_type && header,
seq_type && seq,
qual_type && qual,
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/io/alignment_file/format_sam_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class format_sam_base

template <typename stream_t, typename ref_ids_type>
void write_header(stream_t & stream,
alignment_file_output_options const & options,
sam_file_output_options const & options,
sam_file_header<ref_ids_type> & header);
};

Expand Down Expand Up @@ -649,7 +649,7 @@ inline void format_sam_base::read_header(stream_view_type && stream_view,
*/
template <typename stream_t, typename ref_ids_type>
inline void format_sam_base::write_header(stream_t & stream,
alignment_file_output_options const & options,
sam_file_output_options const & options,
sam_file_header<ref_ids_type> & header)
{
// -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/io/alignment_file/input.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,8 +486,8 @@ class sam_file_input
* 14. seqan3::field::evalue
* 15. seqan3::field::bit_score
*
* There exists one more field for alignment files, the seqan3::field::header_ptr, but this field is mostly used
* internally. Please see the seqan3::alignment_file_output::header member function for details on how to access
* There exists one more field for SAM files, the seqan3::field::header_ptr, but this field is mostly used
* internally. Please see the seqan3::sam_file_output::header member function for details on how to access
* the seqan3::sam_file_header of the file.)
*/
using field_ids = fields<field::seq,
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/io/alignment_file/misc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// -----------------------------------------------------------------------------------------------------

/*!\file
* \brief Provides helper data structures for the seqan3::alignment_file_output.
* \brief Provides helper data structures for the seqan3::sam_file_output.
* \author Svenja Mehringer <svenja.mehringer AT fu-berlin.de>
*/

Expand Down
Loading

0 comments on commit 08f7238

Please sign in to comment.