Skip to content

Instantly share code, notes, and snippets.

@clintval
Last active March 14, 2025 00:25
Show Gist options
  • Save clintval/37c9b5a9b91478046365128c7ee1444b to your computer and use it in GitHub Desktop.
Save clintval/37c9b5a9b91478046365128c7ee1444b to your computer and use it in GitHub Desktop.
abuilder = SamBuilder(r1_len=20, r2_len=20)
(read1, read2) = builder.add_pair(
name="query",
chrom1="chr1",
start1=100,
bases1="A" * 10,
chrom2="chr1",
start2=200,
bases2="C" * 20,
)
read1_supp = builder.add_single(
name="query",
read_num=1,
chrom="chr2",
start=190,
supplementary=True
)
template = Template.build([read1, read2, read1_supp])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment