User: nameuser

gravatar for nameuser
nameuser10
Reputation:
10
Status:
New User
Location:
Last seen:
37 minutes ago
Joined:
4 weeks, 1 day ago
Email:
l**************@gmail.com

Posts by nameuser

<prev • 7 results • page 1 of 1 • next >
0
votes
1
answer
126
views
1
answers
Comment: C: Changing output format for hamming distance of FASTA sequences (using Biopython)
... if __name__ == '__main__': with open(filename + "out.fasta", "w") as f: for record in (SeqIO.parse(filename, 'fasta')): if hamming_distance(str(record.seq)) < 50 : print(">{id}\n{seq}".format(id=record.id, seq=record.seq), file=f) ...
written 10 days ago by nameuser10
0
votes
1
answer
126
views
1
answers
Comment: C: Changing output format for hamming distance of FASTA sequences (using Biopython)
... The logic definitely makes sense to me, I adjusted it a little for errors but the print line was extremely helpful! I'm getting a blank output right now though, when I did a matrix for the sequences, there were plenty (500,000 sequences per file) with less than 50. Additionally, dh is being defined. ...
written 11 days ago by nameuser10
0
votes
1
answer
126
views
1
answers
Comment: C: Changing output format for hamming distance of FASTA sequences (using Biopython)
... oops, must've missed that when I wrote the question. I just fixed their indentation! Thanks. ...
written 11 days ago by nameuser10
3
votes
1
answer
126
views
1
answer
Changing output format for hamming distance of FASTA sequences (using Biopython)
... Hi there, I currently have the code stated below. The output I currently have it set to write out is not what I'm looking for. However, this has been the only way I have successfully run the script. I would like to remove the sequences from a fasta file that have a hamming distance of 50 or more. ...
fasta python hamming_distance biopython sequence written 11 days ago by nameuser10 • updated 8 days ago by Joe17k
0
votes
1
answer
154
views
1
answers
Comment: C: Counting mismatched characters from sequences from a fasta file in comparison to
... from Bio import SeqIO import sys file = SeqIO.parse("file.fasta", "fasta") def hamming_distance(s1, s2): if len(s1) != len(s2): raise ValueError("ALIGN!") return sum(ch1 != ch2 for ch1, ch2 in zip(s1, s2)) result = [] for i, record in enumer ...
written 21 days ago by nameuser10
0
votes
1
answer
154
views
1
answers
Comment: C: Counting mismatched characters from sequences from a fasta file in comparison to
... I tried to add another if statement to remove the sequences with a hamming distance >50 but I was unable to write that in the file, any suggestions for outputing a new fasta file removing those with a count over 50? ...
written 22 days ago by nameuser10
1
vote
1
answer
154
views
1
answer
Counting mismatched characters from sequences from a fasta file in comparison to a reference sequence
... I am attempting to use Biopython to compare all the sequences (~400,000) to a reference sequence. I parsed the fasta file using: for record in SeqIO.parse("filename.fasta", "fasta"). Can someone help with the code to loop over the sequencing in the fasta file and compare it with a string, the refe ...
fasta python biopython written 29 days ago by nameuser10 • updated 29 days ago by Joe17k

Latest awards to nameuser

No awards yet. Soon to come :-)

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1626 users visited in the last hour