view release on metacpan or search on metacpan
doc/bacteria_2_3.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
--label "merge,others,paralogs" \
-o 9_qa
doc/bacteria_2_3.md view on Meta::CPAN
ANCHOR_COUNT=$(faops n50 -H -N 0 -C anchorLong/anchor.fasta)
echo ${ANCHOR_COUNT}
rm -fr anchorLong/group
anchr group \
anchorLong/anchorLong.db \
anchorLong/anchorLong.ovlp.tsv \
--oa anchorLong/anchor.ovlp.tsv \
--parallel 16 \
--range "1-${ANCHOR_COUNT}" --len 1000 --idt 0.98 --max "-14" -c 4 --png
pushd ${BASE_DIR}/anchorLong
cat group/groups.txt \
| parallel --no-run-if-empty -j 8 '
echo {};
anchr orient \
--len 1000 --idt 0.98 \
group/{}.anchor.fasta \
group/{}.long.fasta \
-r group/{}.restrict.tsv \
doc/bacteria_2_3.md view on Meta::CPAN
/anchor.+anchor/ or next;
print;
'\'' \
> group/{}.anchor.ovlp.tsv
anchr layout \
group/{}.ovlp.tsv \
group/{}.relation.tsv \
group/{}.strand.fasta \
--oa group/{}.anchor.ovlp.tsv \
--png \
-o group/{}.contig.fasta
'
popd
# false strand
cat anchorLong/group/*.ovlp.tsv \
| perl -nla -e '/anchor.+long/ or next; print $F[0] if $F[8] == 1;' \
| sort | uniq -c
cat \
doc/bacteria_2_3.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
1_genome/paralogs.fas \
--label "merge,paralogs" \
-o 9_qa
doc/bacteria_2_3.md view on Meta::CPAN
ANCHOR_COUNT=$(faops n50 -H -N 0 -C anchorLong/anchor.fasta)
echo ${ANCHOR_COUNT}
rm -fr anchorLong/group
anchr group \
anchorLong/anchorLong.db \
anchorLong/anchorLong.ovlp.tsv \
--oa anchorLong/anchor.ovlp.tsv \
--parallel 16 \
--range "1-${ANCHOR_COUNT}" --len 1000 --idt 0.98 --max "-14" -c 4 --png
pushd ${BASE_DIR}/anchorLong
cat group/groups.txt \
| parallel --no-run-if-empty -j 8 '
echo {};
anchr orient \
--len 1000 --idt 0.98 \
group/{}.anchor.fasta \
group/{}.long.fasta \
-r group/{}.restrict.tsv \
doc/bacteria_2_3.md view on Meta::CPAN
/anchor.+anchor/ or next;
print;
'\'' \
> group/{}.anchor.ovlp.tsv
anchr layout \
group/{}.ovlp.tsv \
group/{}.relation.tsv \
group/{}.strand.fasta \
--oa group/{}.anchor.ovlp.tsv \
--png \
-o group/{}.contig.fasta
'
popd
# false strand
cat anchorLong/group/*.ovlp.tsv \
| perl -nla -e '/anchor.+long/ or next; print $F[0] if $F[8] == 1;' \
| sort | uniq -c
cat \
doc/bacteria_2_3.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
--label "merge,others,paralogs" \
-o 9_qa
doc/bacteria_2_3.md view on Meta::CPAN
ANCHOR_COUNT=$(faops n50 -H -N 0 -C anchorLong/anchor.fasta)
echo ${ANCHOR_COUNT}
rm -fr anchorLong/group
anchr group \
anchorLong/anchorLong.db \
anchorLong/anchorLong.ovlp.tsv \
--oa anchorLong/anchor.ovlp.tsv \
--parallel 16 \
--range "1-${ANCHOR_COUNT}" --len 1000 --idt 0.98 --max "-14" -c 4 --png
pushd ${BASE_DIR}/anchorLong
cat group/groups.txt \
| parallel --no-run-if-empty -j 8 '
echo {};
anchr orient \
--len 1000 --idt 0.98 \
group/{}.anchor.fasta \
group/{}.long.fasta \
-r group/{}.restrict.tsv \
doc/bacteria_2_3.md view on Meta::CPAN
/anchor.+anchor/ or next;
print;
'\'' \
> group/{}.anchor.ovlp.tsv
anchr layout \
group/{}.ovlp.tsv \
group/{}.relation.tsv \
group/{}.strand.fasta \
--oa group/{}.anchor.ovlp.tsv \
--png \
-o group/{}.contig.fasta
'
popd
# false strand
cat anchorLong/group/*.ovlp.tsv \
| perl -nla -e '/anchor.+long/ or next; print $F[0] if $F[8] == 1;' \
| sort | uniq -c
cat \
doc/bacteria_2_3.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
--label "merge,others,paralogs" \
-o 9_qa
doc/bacteria_2_3.md view on Meta::CPAN
ANCHOR_COUNT=$(faops n50 -H -N 0 -C anchorLong/anchor.fasta)
echo ${ANCHOR_COUNT}
rm -fr anchorLong/group
anchr group \
anchorLong/anchorLong.db \
anchorLong/anchorLong.ovlp.tsv \
--oa anchorLong/anchor.ovlp.tsv \
--parallel 16 \
--range "1-${ANCHOR_COUNT}" --len 1000 --idt 0.98 --max "-14" -c 4 --png
pushd ${BASE_DIR}/anchorLong
cat group/groups.txt \
| parallel --no-run-if-empty -j 8 '
echo {};
anchr orient \
--len 1000 --idt 0.98 \
group/{}.anchor.fasta \
group/{}.long.fasta \
-r group/{}.restrict.tsv \
doc/bacteria_2_3.md view on Meta::CPAN
/anchor.+anchor/ or next;
print;
'\'' \
> group/{}.anchor.ovlp.tsv
anchr layout \
group/{}.ovlp.tsv \
group/{}.relation.tsv \
group/{}.strand.fasta \
--oa group/{}.anchor.ovlp.tsv \
--png \
-o group/{}.contig.fasta
'
popd
# false strand
cat anchorLong/group/*.ovlp.tsv \
| perl -nla -e '/anchor.+long/ or next; print $F[0] if $F[8] == 1;' \
| sort | uniq -c
cat \
doc/bacteria_2_3.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# anchors sorted on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
--label "merge,others,paralogs" \
-o 9_qa
doc/bacteria_2_3.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
--label "merge,others,paralogs" \
-o 9_qa
doc/bacteria_2_3.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# anchors sorted on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
--label "merge,others,paralogs" \
-o 9_qa
doc/bacteria_2_3.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# anchors sorted on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
--label "merge,others,paralogs" \
-o 9_qa
doc/e_coli.md view on Meta::CPAN
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# anchor sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
# mummerplot files
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot out.delta --png --large -p anchor.sort
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# minidot
minimap merge/anchor.sort.fa 1_genome/genome.fa \
| minidot - > merge/anchor.minidot.eps
# quast
rm -fr 9_qa_merge
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
8_spades/contigs.fasta \
doc/e_coli.md view on Meta::CPAN
| sort -k 1n,1n -k 2n,2n \
> anchor.ovlp.tsv
rm -fr group
anchr group \
anchorLong.db \
anchorLong.ovlp.tsv \
--oa anchor.ovlp.tsv \
--parallel 16 \
--range $(cat environment.json | jq -r '.TRUSTED') \
--len 1000 --idt 0.85 --max "-30" -c 2 --png
cat group/groups.txt \
| parallel --no-run-if-empty -j 8 '
echo {};
anchr orient \
--len 1000 --idt 0.85 \
group/{}.anchor.fasta \
group/{}.long.fasta \
-r group/{}.restrict.tsv \
-o group/{}.strand.fasta;
doc/e_coli.md view on Meta::CPAN
/anchor.+anchor/ or next;
print;
'\'' \
> group/{}.anchor.ovlp.tsv
anchr layout \
group/{}.ovlp.tsv \
group/{}.relation.tsv \
group/{}.strand.fasta \
--oa group/{}.anchor.ovlp.tsv \
--png \
-o group/{}.contig.fasta
'
popd
# false strand
cat anchorLong/group/*.ovlp.tsv \
| perl -nla -e '/anchor.+long/ or next; print $F[0] if $F[8] == 1;' \
| sort | uniq -c
cat \
doc/e_coli.md view on Meta::CPAN
CONTIG_COUNT=$(faops n50 -H -N 0 -C contigTrim/anchor.fasta)
echo ${CONTIG_COUNT}
rm -fr contigTrim/group
anchr group \
--parallel 16 \
--keep \
contigTrim/anchorLong.db \
contigTrim/anchorLong.ovlp.tsv \
--range "1-${CONTIG_COUNT}" --len 1000 --idt 0.98 --max 20000 -c 1 --png
pushd contigTrim
cat group/groups.txt \
| parallel --no-run-if-empty -j 8 '
echo {};
anchr orient \
--len 1000 --idt 0.98 \
group/{}.anchor.fasta \
group/{}.long.fasta \
-r group/{}.restrict.tsv \
doc/e_coli.md view on Meta::CPAN
group/{}.strand.fasta \
-o stdout \
| anchr restrict \
stdin group/{}.restrict.tsv \
-o group/{}.ovlp.tsv;
anchr layout \
group/{}.ovlp.tsv \
group/{}.relation.tsv \
group/{}.strand.fasta \
--png \
-o group/{}.contig.fasta
'
popd
cat \
contigTrim/group/non_grouped.fasta \
contigTrim/group/*.contig.fasta \
> contigTrim/contig.fasta
# minidot
doc/gage_b.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
8_competitor/abyss_ctg.fasta \
8_competitor/cabog_ctg.fasta \
8_competitor/mira_ctg.fasta \
8_competitor/msrca_ctg.fasta \
8_competitor/sga_ctg.fasta \
doc/gage_b.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
8_competitor/abyss_ctg.fasta \
8_competitor/cabog_ctg.fasta \
8_competitor/mira_ctg.fasta \
8_competitor/msrca_ctg.fasta \
8_competitor/sga_ctg.fasta \
doc/gage_b.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
8_competitor/abyss_ctg.fasta \
8_competitor/cabog_ctg.fasta \
8_competitor/mira_ctg.fasta \
8_competitor/msrca_ctg.fasta \
8_competitor/sga_ctg.fasta \
doc/gage_b.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
8_competitor/abyss_ctg.fasta \
8_competitor/cabog_ctg.fasta \
8_competitor/mira_ctg.fasta \
8_competitor/msrca_ctg.fasta \
8_competitor/sga_ctg.fasta \
doc/gage_b.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
8_competitor/abyss_ctg.fasta \
8_competitor/cabog_ctg.fasta \
8_competitor/mira_ctg.fasta \
8_competitor/msrca_ctg.fasta \
8_competitor/sga_ctg.fasta \
doc/gage_b.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
8_competitor/abyss_ctg.fasta \
8_competitor/cabog_ctg.fasta \
8_competitor/mira_ctg.fasta \
8_competitor/msrca_ctg.fasta \
8_competitor/sga_ctg.fasta \
doc/gage_b.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
8_competitor/abyss_ctg.fasta \
8_competitor/cabog_ctg.fasta \
8_competitor/mira_ctg.fasta \
8_competitor/msrca_ctg.fasta \
8_competitor/sga_ctg.fasta \
doc/model_organisms.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# anchor sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
--label "merge,others,paralogs" \
-o 9_qa
doc/model_organisms.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# anchor sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
--eukaryote \
--no-icarus \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
doc/model_organisms.md view on Meta::CPAN
--len 1000 --idt 0.98 --proportion 0.99999 --parallel 16 \
-o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# anchor sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot -png out.delta -p anchor.sort --large
# mummerplot files
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
--eukaryote \
--no-icarus \
-R 1_genome/genome.fa \
merge/anchor.merge.fasta \
merge/others.merge.fasta \
1_genome/paralogs.fas \
doc/model_organisms.md view on Meta::CPAN
| faops filter -a 1000 -l 0 stdin merge/others.contained.fasta
anchr orient merge/others.contained.fasta --len 1000 --idt 0.98 -o merge/others.orient.fasta
anchr merge merge/others.orient.fasta --len 1000 --idt 0.999 -o stdout \
| faops filter -a 1000 -l 0 stdin merge/others.merge.fasta
# anchor sort on ref
bash ~/Scripts/cpan/App-Anchr/share/sort_on_ref.sh merge/anchor.merge.fasta 1_genome/genome.fa merge/anchor.sort
# mummerplot files
nucmer -l 200 1_genome/genome.fa merge/anchor.sort.fa
mummerplot out.delta --png --large -p anchor.sort
rm *.[fr]plot
rm out.delta
rm *.gp
mv anchor.sort.png merge/
# minidot
minimap 1_genome/genome.fa merge/anchor.sort.fa | minidot - > merge/anchor.minidot.eps
# quast
rm -fr 9_qa
quast --no-check --threads 16 \
--eukaryote \
--no-icarus \
-R 1_genome/genome.fa \
lib/App/Anchr/Command/group.pm view on Meta::CPAN
[ "dir|d=s", "output directory", ],
[ "range|r=s", "ranges of anchors", { required => 1 }, ],
[ "coverage|c=i", "minimal coverage", { default => 2 }, ],
[ "max=i", "max distance", { default => 5000 }, ],
[ "len|l=i", "minimal length of overlaps", { default => 1000 }, ],
[ "idt|i=f", "minimal identity of overlaps", { default => 0.85 }, ],
[ "keep", "don't remove multi-matched reads", ],
[ 'oa=s', 'overlaps between anchors', ],
[ "parallel|p=i", "number of threads", { default => 4 }, ],
[ "verbose|v", "verbose mode", ],
[ "png", "write a png file via graphviz", ],
{ show_defaults => 1, }
);
}
sub usage_desc {
return "anchr group [options] <dazz DB> <ovlp file>";
}
sub description {
my $desc;
lib/App/Anchr/Command/group.pm view on Meta::CPAN
$cmd .= " | faops filter -l 0 stdin stdout";
$cmd .= " > " . $out_dir->child("$basename.long.fasta")->stringify;
system $cmd;
}
$cc_serial++;
}
printf STDERR "CC count %d\n", scalar(@ccs);
if ( $opt->{png} ) {
App::Anchr::Common::g2gv0( $graph, $fn_dazz . ".png" );
}
}
1;
lib/App/Anchr/Command/layout.pm view on Meta::CPAN
use constant abstract => "layout anthor group";
sub opt_spec {
return (
[ "outfile|o=s", "output filename", ],
[ 'border=i', 'length of borders in anchors', { default => 100 }, ],
[ "max=i", "max distance", { default => 5000 }, ],
[ 'pa=s', 'prefix of anchors', { default => "anchor" }, ],
[ 'oa=s', 'overlaps between anchors', ],
[ "png", "write a png file via graphviz", ],
{ show_defaults => 1, },
);
}
sub usage_desc {
return "anchr layout [options] <.ovlp.tsv> <.relation.tsv> <strand.fasta>";
}
sub description {
my $desc;
lib/App/Anchr/Command/layout.pm view on Meta::CPAN
if ( @s > 1 ) {
@s = map { $_->[0] }
sort { $a->[1] <=> $b->[1] }
map { [ $_, $graph->get_edge_weight( $l, $_, ) ] } @s;
for my $i ( 0 .. $#s - 1 ) {
$anchor_graph->add_edge( $s[$i], $s[ $i + 1 ] );
}
}
}
if ( $opt->{png} ) {
App::Anchr::Common::g2gv( $anchor_graph, $args->[0] . ".png" );
}
App::Anchr::Common::transitive_reduction($anchor_graph);
if ( $opt->{png} ) {
App::Anchr::Common::g2gv( $anchor_graph, $args->[0] . ".reduced.png" );
}
}
#----------------------------#
# existing relations
#----------------------------#
my $relation_of = {};
{
for my $line ( Path::Tiny::path( $args->[1] )->lines( { chomp => 1 } ) ) {
my @fields = split "\t", $line;
lib/App/Anchr/Command/merge.pm view on Meta::CPAN
use constant abstract => "merge overlapped super-reads, k-unitigs, or anchors";
sub opt_spec {
return (
[ "outfile|o=s", "output filename, [stdout] for screen", ],
[ "len|l=i", "minimal length of overlaps", { default => 1000 }, ],
[ "idt|i=f", "minimal identity of overlaps", { default => 0.98 }, ],
[ "parallel|p=i", "number of threads", { default => 8 }, ],
[ "verbose|v", "verbose mode", ],
[ "png", "write a png file via graphviz", ],
{ show_defaults => 1, }
);
}
sub usage_desc {
return "anchr merge [options] <infile>";
}
sub description {
my $desc;
lib/App/Anchr/Command/merge.pm view on Meta::CPAN
#
# Remove branching nodes
# for my $v ( $graph->vertices ) {
# if ( $graph->out_degree($v) > 1 or $graph->in_degree($v) > 1 ) {
# $graph->delete_vertex($v);
# }
# }
$tempdir->child("overlapped.txt")->spew( map {"$_\n"} $graph->vertices );
if ( $opt->{png} ) {
App::Anchr::Common::g2gv( $graph, $infile . ".png" );
}
}
{ # Output non-overlapped
my $cmd;
$cmd .= "faops some -i -l 0 $infile overlapped.txt non-overlapped.fasta";
App::Anchr::Common::exec_cmd( $cmd, { verbose => $opt->{verbose}, } );
}
#----------------------------#
lib/App/Anchr/Common.pm view on Meta::CPAN
for my $e ( $g->edges ) {
if ( $g->has_edge_weight( @{$e} ) ) {
$gv->add_edge( @{$e}, label => $g->get_edge_weight( @{$e} ) );
}
else {
$gv->add_edge( @{$e} );
}
}
Path::Tiny::path($fn)->spew_raw( $gv->as_png );
}
sub g2gv0 {
#@type Graph
my $g = shift;
my $fn = shift;
my $gv = GraphViz->new( directed => 0 );
for my $v ( $g->vertices ) {
$gv->add_node($v);
}
for my $e ( $g->edges ) {
$gv->add_edge( @{$e} );
}
Path::Tiny::path($fn)->spew_raw( $gv->as_png );
}
sub transitive_reduction {
#@type Graph
my $g = shift;
my $count = 0;
my $prev_count;
while (1) {
t/11-group.t view on Meta::CPAN
like( $result->error, qr{doesn't exist}, 'infile not exists' );
{
# real run
my $tempdir = Path::Tiny->tempdir;
test_app( 'App::Anchr' =>
[ qw(overlap2 t/1_4.anchor.fasta t/1_4.pac.fasta), "-d", $tempdir->stringify, ] );
$result = test_app(
'App::Anchr' => [
qw(group --png --range 1-4),
$tempdir->child("anchorLong.db")->stringify,
$tempdir->child("anchorLong.ovlp.tsv")->stringify,
]
);
ok( $tempdir->child("group")->is_dir, 'output directory exists' );
ok( $tempdir->child("group")->child("groups.txt"), 'groups.txt exists' );
}
done_testing();